lundi 13 avril 2015

I'm trying to understand how GDIPlus measures simulated bold text

I'm looking for pointers as to how GDIPlus determines how much to widen a string by when simulating bold.


We are investigating how Windows (specifically GDIPlus on Windows 7 & 8) simulates bold text, when measuring the width/height of the text.


We think we understand how normal (non Chinese/Korean/Japanese) text is simulated, using a single multiplier for all chararacters. Similarly Chinese/Korean/Japanese emboldening seems to involve a simple multiplier (though typically a much smaller number). However we have found another set of numbers for mixed CJK and non-CJK strings.


Further the height of the string can be different for Chinese & Korean when CJK and non-CJK characters are mixed in a string.


As far as I can tell there are a large number of multipliers, depending on the font, character set being used, with different multipliers depending on if the text being measured is mixed CJK/nonCJK, CJK only or nonCJK only.


The TL:DR version of this is that GDIPlus appears to use a great many magic numbers when measuring a simulating bold string, I have been unable to find any explanation of how this is done (with nothing noticable in the registry) so any pointers would be great.


Aucun commentaire:

Enregistrer un commentaire