Date: prev next · Thread: first prev next last
2016 Archives by date, by thread · List index


Hi,

I have been trying to understand how font
scaling(Format->Chracter->Position) works in Windows. This is my
understanding so far:
Consider the font preview window: First a LOGFONT with width=0 is
created. Then CreateFontIndirect is called which searches for a font
according to the criteria mentioned here
:https://msdn.microsoft.com/en-us/library/windows/desktop/dd145037(v=vs.85).aspx
. After that the 100% width is obtained from the new log font and is
scaled by the scaling factor. And eventually again  a new LOGFONT is
created with the lfWidth( which is the average char width of the font
) equal to our scaled width. Finally, this is the font set into the
device context and used in layout and drawing.
After choosing the scaling and closing the font preview window, a
SwFntObj with the scaled width is created ( in CreatePrtFnt ). This
font is used in further layout related functions.

Can anyone confirm if my understanding of the process is correct. Also
am I missing anything?

Regards,
Akash

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.