By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,455 Members | 1,430 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,455 IT Pros & Developers. It's quick & easy.

Font Question

P: n/a
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
Nov 15 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
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.

Stephan Rose wrote:

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


--
Bret Pehrson
mailto:br**@infowest.com
NOSPAM - Include this key in all e-mail correspondence <<38952rglkwdsl>>
Nov 15 '05 #2

P: n/a
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]

"Stephan Rose" <ke**********@kermos-no-spam-reversed.net> wrote in message
news:pc********************************@4ax.com...
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

Nov 15 '05 #3

P: n/a
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

On Fri, 06 Feb 2004 21:47:37 -0800, Bret Pehrson <br**@infowest.com>
wrote:
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.

Stephan Rose wrote:

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


Nov 15 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.