flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
scientica 28 Jul 2004, 12:30
I'd guess it's an ingeter (thus 32-bit, unless it's like wchar_t (the it's 16-bit), PointSize sounds like '"pt" size' of the font - if that's of any help to you.
(/me don't have windows to check that regkey) |
|||
![]() |
|
crc 28 Jul 2004, 12:46
iPointSize is 10 times the current size of the font (example: iPointSize=100, the font=10 points). Something like the following code should be all you need to convert from iPointSize to actual points:
Code: mov eax, [iPointSize] mov ebx, 10 div eax |
|||
![]() |
|
decard 28 Jul 2004, 14:23
thanks, but how can I convert this value to LOGFONT.lfHeight? That's what win32.hlp says:
Quote: lfHeight actually I just don't understand it ![]() |
|||
![]() |
|
Frank 28 Jul 2004, 15:26
Hi decard,
in the section that you already quoted, WIN32 help further says: Code: For the MM_TEXT mapping mode, you can use the following formula to specify a height for a font with a given point size: lfHeight = -MulDiv(PointSize, GetDeviceCaps(hDC, LOGPIXELSY), 72); LOGPIXELSY is the number of pixels per logical inch along the screen height. Your program should determine LOGPIXELSY, multiply it with the point size that you already have, and divide the product by 72. Then multiply with -1. Here is a table of hardcoded values that I use on a set of computers where I know LOGPIXELSY to be 96: Code: hFonts dd -11, -13, -16, -19, -21, -24, -32, -64 ; ( 8, 10, 12, 14, 16, 18, 24, 48 point font size) sizeof.hFonts = $ - hFonts Regards Frank |
|||
![]() |
|
decard 29 Jul 2004, 15:23
well, it's a bit more complicated than I thought, but this simple lookup table should be a good solution for me
![]() Thanks. |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2023, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.