Creating new font characters

This is a discussion on Creating new font characters within the Windows Programming forums, part of the Platform Specific Boards category; I'm making a small program to convert roman numerals to decimal, but to do that I need to be able ...

  1. #1
    mustang benny bennyandthejets's Avatar
    Join Date
    Jul 2002
    Posts
    1,401

    Creating new font characters

    I'm making a small program to convert roman numerals to decimal, but to do that I need to be able to draw a tilde over an M, to represent a million. Ie:

    ~
    M

    But of course, I want the tilde to be right on top of the M, not on the line above.

    What is the best method to achieve this? I tried drawing it myself, but I got stuck because of the complexity of edit control painting. Would it be possible to create a new character, or something similar?
    benforbes@optusnet.com.au
    Microsoft Visual Studio .NET 2003 Enterprise Architect
    Windows XP Pro

    Code Tags
    Programming FAQ
    Tutorials

  2. #2
    Registered User
    Join Date
    May 2002
    Posts
    132
    Instead of using an edit control you could always just have the client rect of the program with a white background (or maybe just use an edit control for user input leaving the rest of the client rect white by itself) and then using the TextOut() function you could setup the co-ordinates of the two (the M and the ~) so then they are exactly how you want them? That is one solution other then creating your own font, or finding a font that someone else has already made that utilizes this type of M with the ~ on top of it. I'm sure someone has created a font that contains this character but I couldn't tell you exactly which one. I searched a couple fonts in the unicode format (so then I got all the characters) and there was no sign of this character. If I find one though, I'll let you know.

    Good luck and hope this helps,
    Tyouk

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. destroywindow() problem
    By algi in forum Windows Programming
    Replies: 6
    Last Post: 03-27-2005, 11:40 PM
  2. button in function
    By algi in forum Windows Programming
    Replies: 1
    Last Post: 03-21-2005, 11:12 PM
  3. How to install font programattically ?
    By cr_naik in forum Windows Programming
    Replies: 0
    Last Post: 06-27-2003, 04:20 AM
  4. Characters in a txt file.
    By tay_highfield in forum C Programming
    Replies: 3
    Last Post: 01-31-2003, 09:19 AM
  5. printing non-ASCII characters (in unicode)
    By dbaryl in forum C Programming
    Replies: 1
    Last Post: 10-25-2002, 02:00 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21