diff options
Diffstat (limited to 'src/kernel/tqfontengine_x11.cpp')
-rw-r--r-- | src/kernel/tqfontengine_x11.cpp | 41 |
1 files changed, 9 insertions, 32 deletions
diff --git a/src/kernel/tqfontengine_x11.cpp b/src/kernel/tqfontengine_x11.cpp index 8002c42df..6363aac97 100644 --- a/src/kernel/tqfontengine_x11.cpp +++ b/src/kernel/tqfontengine_x11.cpp @@ -2264,8 +2264,6 @@ struct OTScripts { int flags; }; -// Refer to https://learn.microsoft.com/en-us/typography/opentype/spec/scripttags -// for OpenType language tags definition static const OTScripts ot_scripts [] = { // // European Alphabetic Scripts // Latin, @@ -2353,7 +2351,6 @@ static const OTScripts ot_scripts [] = { { FT_MAKE_TAG( 'c', 'a', 'n', 's' ), 0 }, // Mongolian, { FT_MAKE_TAG( 'm', 'o', 'n', 'g' ), 0 }, - // // Symbols // CurrencySymbols, { FT_MAKE_TAG( 'D', 'F', 'L', 'T' ), 0 }, @@ -2373,26 +2370,13 @@ static const OTScripts ot_scripts [] = { { FT_MAKE_TAG( 'D', 'F', 'L', 'T' ), 0 }, // Braille, { FT_MAKE_TAG( 'b', 'r', 'a', 'i' ), 0 }, - -// Unicode - { FT_MAKE_TAG( 'D', 'F', 'L', 'T' ), 0 }, - -// Tagalog, - { FT_MAKE_TAG( 't', 'g', 'l', 'g' ), 0 }, -// Hanunoo, - { FT_MAKE_TAG( 'h', 'a', 'n', 'o' ), 0 }, -// Buhid, - { FT_MAKE_TAG( 'b', 'u', 'h', 'd' ), 0 }, -// Tagbanwa, - { FT_MAKE_TAG( 't', 'a', 'g', 'b' ), 0 }, - -// KatakanaHalfWidth, -- can't find it, use Katakana code - { FT_MAKE_TAG( 'k', 'a', 'n', 'a' ), 0 }, - -// Limbu, - { FT_MAKE_TAG( 'l', 'i', 'm', 'b' ), 0 }, -// TaiLe, - { FT_MAKE_TAG( 't', 'a', 'l', 'e' ), 0 } +// Unicode, should be used + { FT_MAKE_TAG( 'D', 'F', 'L', 'T' ), 0 } + // ### where are these? +// { FT_MAKE_TAG( 'b', 'y', 'z', 'm' ), 0 }, +// { FT_MAKE_TAG( 'D', 'F', 'L', 'T' ), 0 }, + // ### Hangul Jamo +// { FT_MAKE_TAG( 'j', 'a', 'm', 'o' ), 0 }, }; TQOpenType::TQOpenType(TQFontEngineXft *fe) @@ -2451,10 +2435,7 @@ TQOpenType::~TQOpenType() bool TQOpenType::checkScript(unsigned int script) { - if (script >= TQFont::NScripts || script >= sizeof(ot_scripts) / sizeof(OTScripts)) - { - return false; - } + assert(script < TQFont::NScripts); uint tag = ot_scripts[script].tag; int requirements = ot_scripts[script].flags; @@ -2496,11 +2477,7 @@ void TQOpenType::selectScript(unsigned int script, const Features *features) if (current_script == script) return; - if (script >= TQFont::NScripts || script >= sizeof(ot_scripts) / sizeof(OTScripts)) - { - return; - } - + assert(script < TQFont::NScripts); // find script in our list of supported scripts. uint tag = ot_scripts[script].tag; |