On 3/7/19 4:45 PM, Akihiro Sagawa wrote:
+static BOOL get_cjk_font_margins(HDC hdc, BOOL unicode, SHORT *left, SHORT *right) +{
- ABC abc[256];
- UINT i;
- *left = *right = 0;
- if (!unicode) {
if (!GetCharABCWidthsA(hdc, 0, 255, abc))
return FALSE;
- } else {
if (!GetCharABCWidthsW(hdc, 0, 255, abc))
return FALSE;
- }
- for (i = 0; i < ARRAY_SIZE(abc); i++) {
if (-abc[i].abcA > *right) *right = -abc[i].abcA;
if (-abc[i].abcC > *left ) *left = -abc[i].abcC;
- }
- return TRUE;
+}
Is it possible to demonstrate this with some font, specifically modified to have one glyph significantly of?
It seems to me it's much more likely it would be using some averaged metric instead, specified by the font.