Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1218
  • Last Modified:

Overscores in RichText format

(actually a VC++ app, but most RichText questions seem to wind up here)

I need to be able to put a line *over* a character in RichText.  I find it somewhat bizarre that this isn't just standard; according to the MSDN docs you can do underlines, double underlines, *wavy* underlines, dot-dot-dash underlines, but overlines aren't mentioned.

But no use crying about that, I guess.  Surely there must be a way around it.  Can I, say, put a dash as a superscript, with a negative space before it?  How do you do negative spaces in Rich Text, if it's possible?

To clarify, what I'm interested in is how to produce the ASCII code for the rich text; e.g., to put an underline
before a character x, you'd do \ul x \ul0.  I want to
know how to do an overline.
0
trovatore
Asked:
trovatore
1 Solution
 
AzraSoundCommented:
Seems logical that it would just be "ol", but you could probably find out for sure by downloading the rtf code specs from www.wotsit.org (site was down when i tried to visit it just now, however)
0
 
AzraSoundCommented:
Update:
Finally got to wotsit, downloaded the latest RTF specs, and saw no mention of any overline support.
0
 
trovatoreAuthor Commented:
Does seem logical, doesn't it?  But it ain't so.  I
appreciate the tip for the specs, but there is just
no "overline" there in parallel with "underline", and
so what I really need is a workaround, like a
negative space or something.
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
AzraSoundCommented:
I'm not really sure of any workaround...never heard of anything like a negative space or the like.  How would you achieve this in MS Word?  I couldn't even figure that out, and rtf documents are less complex/powerful than word documents.

Do you need this functionality over any letter?  If only certain ones, the font you use may already have the ability to display certain letters with that ability (e.g. in Arial, â, ç, î)

Will these documents need to be printed, saved, reopened for later use, or is this strictly a display thing?
0
 
AzraSoundCommented:
Apparently the text is not posted as Arial as it is in this text entry box (those letters above appeared with overlines)
0
 
trovatoreAuthor Commented:
I need it over an x, a y, and a mu (that's
an m in Symbol font).  It needs to be
in RichText format that other applications
can display.
0
 
AzraSoundCommented:
Well, it may be a start, but it appears the Symbol font has an overline character (I was able to use it and write another character below it in Word).  It has the character code 96. You may be able to just alter the font to Symbol, write that character code, and then your letter (x, y, or mu <~~ staying in Symbol font if necessary).  I have yet to try and actually implement the code using the RichTextBox, but I did it by simply typing in Word, so that may be a start (save as RTF and view the rtf code in Notepad).
0
 
trovatoreAuthor Commented:
I can't get it to appear directly over the character.
It seems to be either before or after.  That's
what I wanted the negative space for.
0
 
AzraSoundCommented:
Checked when I got home...
With Word 2000 I can get it to appear above a letter by simply first typing the overline character, use my arrow key to move back under it, and then type any letter.  However, I save as RTF and view it in WordPad, and it no longer appears under the overline character.  This tells me that maybe something in the latest .doc specs allows this, but RTF still does not support it.

AFAIK, the last option may be to find a font that automatically supports these needed characters, and just distribute it with your application.
0
 
trovatoreAuthor Commented:
No, I'm afraid that doesn't work for us.  Actually we
*have* such a font; we're trying to get rid of it, because
it causes problems for Asian users, and because if you
send stuff to a third party that doesn't have our program,
he sees nonsense characters.  That's the whole point of
using RTF.
0
 
AzraSoundCommented:
Well remember you are sometimes limited by technology, and I'm sure you can respect that.  I am just spitting out ideas...sometimes the answer comes from looking elsewhere instead of right at the light.

Is this some sort of equation creator (the x's and y's and mu's are causing me to assume).  Have you considered generating an image for these equations, since you can easily embed those into an rtf document?
0
 
trovatoreAuthor Commented:
Yeah, I've thought about that.  It's not ideal, because
we'd like the user to be able to choose a font size, but
it's not horrible because there are not that many cases
where these overscore characters are used.

I should clarify my earlier comment -- the users who are
inconvenienced by the font are not Asian users per se, but
users running Asian-language versions of Windows.  I
expect that was clear enough, but just to be sure.
0
 
DanRollinsCommented:
Hi trovatore,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Refund points and save as a 0-pt PAQ.

trovatore, Please DO NOT accept this comment as an answer.
EXPERTS: Post a comment if you are certain that an expert deserves credit.  Explain why.
==========
DanRollins -- EE database cleanup volunteer
0
 
SpideyModCommented:
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now