Font Question

  • Thread starter Thread starter Stephan Rose
  • Start date Start date
S

Stephan Rose

Ok here's my situation...

Creating a electronics engineering app..using DirectX for rendering as
GDI+ is just too slow for this purpose...so far, so good.

Now it just so happens that certain things...require an *overline* (as
in, over the letters rather than under), ie certain names for pins for
instance are normally overlined. Problem is, how do I do this? There
are no styles to specify this.

I've tried to manually do it somehow, but between all the different
justification options..plus the fact that the text can be
rotated....it's been beyond a pure nightmare. And I didn't even start
trying to do it over just individual characters yet...

Also the approach I was using drawing the line manually ended up being
so complex that I'm afraid that it'd cost me too much performance.

So what, if any, are my options here?


Thanks,

Stephan
 
The simplest would be to just use a typeface that has the overline as part of
the individual characters. If you can't find a typeface that fits your
specific needs, you can always take an existing typeface and edit it w/ an
editor and add the line.

This assumes that your app defines the typeface, and doesn't allow the user to
arbitrarily specify the font.

Otherwise, you are probably going to be stuck manually drawing the line
yourself.
 
AFAIR, DX doesn't have font support anyway - basically, when you draw text
on a DX surface, you are in fact using GDI. Same with shapes.
To avoid drawing extra lines and calculating positions, try obtaining a
typeface that already has glyphs with overline.

-Rob Teixeira [MVP]
 
Thanks, I ended up defining my own font that has strikethrough
redefined at overline height...

Working great at GDI+....

Fails using DirectX version....apparently, I can get neither
strikethrough nor underline styles....*sigh*...

Stephan
 
Back
Top