mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
UnicodeLine: Use SBCodepointGetGeneralCategory for category analysis
This commit is contained in:
parent
7a78f1fc02
commit
107a383bb4
3 changed files with 6 additions and 4 deletions
|
|
@ -370,7 +370,7 @@ public:
|
|||
const auto level = point.embeddingLevel;
|
||||
const auto isEven = ! isOdd (level);
|
||||
|
||||
if (point.getGeneralCategory() != GeneralCategory::pc)
|
||||
if (point.getGeneralCategory() != SBGeneralCategoryPC)
|
||||
{
|
||||
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wswitch-enum")
|
||||
switch (point.getBidiType())
|
||||
|
|
|
|||
|
|
@ -239,7 +239,9 @@ private:
|
|||
return LineBreakType::ns;
|
||||
|
||||
case LineBreakType::sa:
|
||||
return contains ({ GeneralCategory::mn, GeneralCategory::mc }, point.getGeneralCategory())
|
||||
return contains ({ (SBGeneralCategory) SBGeneralCategoryMN,
|
||||
(SBGeneralCategory) SBGeneralCategoryMC },
|
||||
point.getGeneralCategory())
|
||||
? LineBreakType::cm
|
||||
: LineBreakType::al;
|
||||
|
||||
|
|
|
|||
|
|
@ -61,9 +61,9 @@ struct UnicodeAnalysisPoint
|
|||
return data.bt;
|
||||
}
|
||||
|
||||
GeneralCategory getGeneralCategory() const
|
||||
auto getGeneralCategory() const
|
||||
{
|
||||
return data.generalCategory;
|
||||
return SBCodepointGetGeneralCategory (character);
|
||||
}
|
||||
|
||||
BidiType getBidiType() const
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue