GetCharacterPlacement() problems

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Mike D Sutton (EDais_at_mvps.org)
Date: 06/16/04


Date: Thu, 17 Jun 2004 00:10:15 +0100

I'm getting very odd results when using the GCP_USEKERNING flag with GetCharacterPlacement() (either the ASCII or Wide versions of
the call) when combined with GCP_MAXEXTENT to handle word wrapping - It appears to be calculating the max extent of the string
incorrectly and returning a small number of characters able to be fit into the available space when there's space for plenty more.
Are these flags incompatible with one another or is this a bug?
Note; I've used GetFontLanguageInfo() to make sure that the selected font has a kerning table and am passing it's return value (with
FLI_GLYPHS masked off and GCP_MAXEXTENT appended) to the API call. With GCP_USEKERNING masked off too then I get correct results
but if possible I'd like to include this for better quality character positioning output - is there some trick to make them play
nicely together?
Cheers,

    Mike

 - Microsoft Visual Basic MVP -
E-Mail: EDais@mvps.org
WWW: http://www.mvps.org/EDais/



Relevant Pages

  • Re: #include files from another directory
    ... "Christopher" wrote: ... > it looks like this (hope the ascii comes out) ... > ....dir support ... Your C++ compiler probably has a flag to let you specify where to look ...
    (comp.lang.cpp)
  • OpenTextFile - TristateMixed / Unicode versus ASCII
    ... I would like to open a file without needing to know whether the file is ... UNICODE or ASCII. ... Does anyone know what the TristateMixed flag means for OpentextFile ...
    (microsoft.public.vb.winapi)
  • Re: Mystery brake - font trivia
    ... bit Ascii (the % acts as a flag which says "the next string of numbers is the code for a character" and 20 is the ascii (also unicode) for a ...
    (rec.crafts.metalworking)