未验证 提交 6771e79b 编写于 作者: E Ebrahim Byagowi 提交者: GitHub

Add pre-opentype font pages detection code (#986)

As Khaled's finding on #981 this is the way Uniscribe detects those fonts. This is its detection part.
上级 277e3289
......@@ -125,6 +125,24 @@ struct os2
*max_cp = max;
}
enum font_page_t {
HEBREW_FONT_PAGE = 0xB100, // Hebrew Windows 3.1 font page
SIMP_ARABIC_FONT_PAGE = 0xB200, // Simplified Arabic Windows 3.1 font page
TRAD_ARABIC_FONT_PAGE = 0xB300, // Traditional Arabic Windows 3.1 font page
OEM_ARABIC_FONT_PAGE = 0xB400, // OEM Arabic Windows 3.1 font page
SIMP_FARSI_FONT_PAGE = 0xBA00, // Simplified Farsi Windows 3.1 font page
TRAD_FARSI_FONT_PAGE = 0xBB00, // Traditional Farsi Windows 3.1 font page
THAI_FONT_PAGE = 0xDE00 // Thai Windows 3.1 font page
};
// https://github.com/Microsoft/Font-Validator/blob/520aaae/OTFontFileVal/val_OS2.cs#L644-L681
inline font_page_t get_font_page () const
{
if (version != 0)
return (font_page_t) 0;
return (font_page_t) (fsSelection & 0xFF00);
}
public:
HBUINT16 version;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册