1
0
Fork 0
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:
reuk 2024-09-05 16:04:03 +01:00
parent 7a78f1fc02
commit 107a383bb4
No known key found for this signature in database
GPG key ID: FCB43929F012EE5C
3 changed files with 6 additions and 4 deletions

View file

@ -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())

View file

@ -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;

View file

@ -61,9 +61,9 @@ struct UnicodeAnalysisPoint
return data.bt;
}
GeneralCategory getGeneralCategory() const
auto getGeneralCategory() const
{
return data.generalCategory;
return SBCodepointGetGeneralCategory (character);
}
BidiType getBidiType() const