Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. manual kerning with winAPI

manual kerning with winAPI

Scheduled Pinned Locked Moved C / C++ / MFC
regexjsonquestion
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Alexander Kindel
    wrote on last edited by
    #1

    I'm working on a program that needs to be able to detect when the user has clicked on a font glyph - the actual filled part of the glyph, not just its bounding box. I'm trying to do this by analyzing the outline produced by GetGlyphOutlineW for each glyph. In this program, most glyphs are drawn by passing a single codepoint to TextOutW, but there is one case where I pass multiple codepoints. I understand that in this case, I have to take kerning into account in order for my analysis of the glyph outlines to match up with what TextOutW draws. Keeping in mind that I want to stick to C API's since the program is actually in another language and calling winAPI through a foreign function interface, are the GetKerningPairs functions the only way to get the necessary information to account for the kerning? In particular, do I have to iterate through all the kerning pairs for the entire font and check each one for whether it matches the pair I'm trying to kern rather than, say, asking Windows for the kerning pair for a particular pair of characters, if one exists?

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups