uniscribe

Calculating the positions of glyphs in Windows

人走茶凉 提交于 2021-02-17 06:25:10
问题 Is there any simple and compatible GDI or .NET accessible subsystem of Windows that will give glyph position characters. The task here is the combining symbols such as those in Arabic which sometimes have chains of multiple combining symbols stacking on top of each others such as Arabic Fatha + Arabic Letter Superscript Alef + Arabic Maddah Above. The trouble is that though the X positions can be determined precisely with GDI GetCharacterPlacement, the Y position calculations which are

How to tell if a surrogate pair Unicode character is supported by the font?

北战南征 提交于 2019-12-21 04:20:59
问题 I was able to find the following method of determining if a Unicode-16 character is supported by a font. Unfortunately that doesn't work for surrogate pair Unicode characters, since WCRANGE struct supported by GetFontUnicodeRanges function returns only WCHAR (16-bit) parameters as output. Here's an example of what I'm trying to do: LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { static HFONT hFont = NULL; switch (message) { case WM_CREATE: { LOGFONT lf = {0};

How do I balance script-oriented OpenType features with other OpenType features using DirectWrite?

孤人 提交于 2019-12-03 12:36:29
问题 Full disclosure: I'm working on my libui GUI framework's text API. This wraps DirectWrite on Windows, Core Text on OS X, and Pango (which uses HarfBuzz for OpenType shaping) on other Unixes. One of the text formatting attributes I want to specify is a collection of OpenType features to use, which all three provide; DirectWrite's is IDWriteTypography . Now, when you draw some text with these libraries, by default you'll get a few useful OpenType features enabled, such as the standard ligatures

How do I balance script-oriented OpenType features with other OpenType features using DirectWrite?

一世执手 提交于 2019-12-03 03:49:39
Full disclosure: I'm working on my libui GUI framework's text API. This wraps DirectWrite on Windows, Core Text on OS X, and Pango (which uses HarfBuzz for OpenType shaping) on other Unixes. One of the text formatting attributes I want to specify is a collection of OpenType features to use, which all three provide; DirectWrite's is IDWriteTypography . Now, when you draw some text with these libraries, by default you'll get a few useful OpenType features enabled, such as the standard ligatures ( liga ) like the f+i ligature. I thought this was font-specific, but it turns out this is specific to