1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 09:17:35 +00:00

LibTTF: Use en-us naming table if available

Some fonts tend to have multiple naming tables, namely MS-Gothic has
3 tables: [macintosh, ja], [windows, en-us], [windows, ja].
This commit is contained in:
LuK1337 2021-07-07 21:10:53 +02:00 committed by Andreas Kling
parent 934e53079f
commit a552c3bc8c
2 changed files with 32 additions and 14 deletions

View file

@ -133,6 +133,12 @@ public:
Macintosh = 1,
Windows = 3,
};
enum class MacintoshLanguage {
English = 0,
};
enum class WindowsLanguage {
EnglishUnitedStates = 0x0409,
};
static Optional<Name> from_slice(const ReadonlyBytes&);
String family_name() const { return string_for_id(NameId::FamilyName); }