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. DirectX DrawText breaks W's

DirectX DrawText breaks W's

Scheduled Pinned Locked Moved C / C++ / MFC
comgraphicsgame-devhelpquestion
2 Posts 2 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.
  • D Offline
    D Offline
    Dave Goodman
    wrote on last edited by
    #1

    When I draw text in DirectX using DrawText, capital W's at the left edge of the text have the upper left pixels mysteriously cropped off. Has anyone else encountered this, who knows of a fix? I'm at Wit's End. Dave Goodman dgoodman@infoway.com www.dkgoodman.com "Actio sequitur esse."

    Z 1 Reply Last reply
    0
    • D Dave Goodman

      When I draw text in DirectX using DrawText, capital W's at the left edge of the text have the upper left pixels mysteriously cropped off. Has anyone else encountered this, who knows of a fix? I'm at Wit's End. Dave Goodman dgoodman@infoway.com www.dkgoodman.com "Actio sequitur esse."

      Z Offline
      Z Offline
      ZoogieZork
      wrote on last edited by
      #2

      Is this with ID3DXFont or CD3DFont (or something based on it)? I've seen this problem with ID3DXFont; it seems that when it draws the text using certain fonts, the kerning bumps the W just out of the texture. Try inserting a space before the W maybe? I'm using a custom derivative of CD3DFont that decouples the font texture from the renderer, and lets me fiddle with the U,V coords for the characters (and "bake in" stuff like drop shadows). It's not as convenient as ID3DXFont and doesn't support Unicode, but it's a lot more flexible for playing with :) - Mike

      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