Re: Win32 Font Metrics

new topic     » goto parent     » topic index » view thread      » older message » newer message

David

- David Cuny

-- begin code --

----  global constant xGetCharABCWidths =   linkFunc(gdi32,
----- "GetCharABCWidthsA",
-----      {C_POINTER, C_LONG, C_LONG, C_POINTER}, C_POINTER )


You are using two different names in your function ?
There are large number of functions in GDI32.dll
Some are used for fixed fonts.

This is how you get TRUE FONT INFORMATION

-- SYNTAX IS BOOL GetCharABCWidths( hdc, uFirstChar, uLastChar, lpabc )

----- Parameter --------- Type ----------- Description ----------

      hdc                 HDC              Device Context ( handle )

      uFirstChar          UNIT             First character in character
                                           range ( unsigned integer )

      uFirstChar           UNIT             Last character in character
                                           range  ( unsigned integer )

      lpabc               LPABC            Pointer to ABC data structure to
                                           receive the character widths
---------------------------------------------------------------------------

Discription: The GETCharABCWidths function retrieves the character widths of
             the characters for the current font in the range from
             uFirstChar to uFirstChar. lpabc points to a data structure
             of the type ABC that receives the character widths.

             typedef struct _ABC
                 {
                  short abcA;
                  short abcB;
                  short abcC;
                 } ABC;

             The abcA part of structure contains the distance that is added
             to the current position before drawing the character glyph.

             The abcB part of structure contains the the drawn portion
             of the character glyph.

             The abcC part of structure contains the white space on
             the right side of the character glyph.
-------------------------------------------------------------------







-- Type ABCglobal constant    abcA                    = allot( Integer ),
    abcB                    = allot( Integer ),
    abcC                    = allot( Integer ),
    SIZEOF_ABC              = allotted_size()

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu