Re: GetGlyphOutline API

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance




"Mihai N." <nmihai_year_2000@xxxxxxxxx> wrote in message
news:Xns98B5D4662972DMihaiN@xxxxxxxxxxxxxxxx

....but my journey to UNICODE began a long time
ago by replacing "char" by CHAR, WCHAR, TCHAR throughout the program.
(It
is far too complicated just to use TCHAR everywhere and the comments are
to
remind me I really meant it.)

I find using TCHAR everywhere way easier.
Among othere because of surprises like this one :-)

I am sure the nasty surprise would have happened anyway, as it is to do with
detailed properties of symbol fonts. But there are other good reasons why
one can't always do that.

For example I stored all strings in my document files as UTF-16 before going
to unicode, in order to achieve a more consistent file format across
different program versions. So it converts its strings to WCHAR before
saving, and from WCHAR after reading. Thus, while my current release
version is not Unicode (and supports win98), it will read the files from my
development version which is Unicode (and will drop win98 support).

Another: MIDI files contain text (titles, instrument names etc) which AFAIK
is always in single byte character format. My program imports these and so
must explicitly deal with CHAR strings. The new version will convert these
to WCHAR for internal use (but must convert back to CHAR when exporting MIDI
files).

So I guess the answer is either use the ASCII methods or change the code
points in my font. I must open up the standard Microsoft symbol fonts
and
see where they put the different glyphs.
I would go Unicode all the way, picking up the proper code points from
"Character Map" (Start -> Programs -> Accesories -> System Tools).
Select the font, check "Advanced view", then select Unicode as "Character
set"

Yes that is my inclination too. However it will involve creating a new
version of the my music symbols font.

Before doing that I need to learn more about how symbol fonts are handled,
and why Unicode code points are relevant at all. What I *thought* I knew is
clearly not true :-( [One problem is that some of my best documentation
came with "fontographer" a good font editor which is unfortunately so
ancient (and apparently no longer under development) that Unicode did not
figure highly.]

Dave
--
David Webber
Author MOZART the music processor for Windows -
http://www.mozart.co.uk
For discussion/support see
http://www.mozart.co.uk/mzusers/mailinglist.htm


.



Relevant Pages

  • Re: How to create own panel with icons of special symbols?
    ... Sorry, I avoid symbol fonts like Wingdings, Zapf Dingbats, Symbol like the plague. ... With Unicode, you wouldn't really have to specify the font: A given code always corresponds to the same character, unlike the symbol fonts. ... I don't know any way to get a character from a symbol font to display in a button, so I see no way to make the macro work properly with them. ...
    (microsoft.public.word.vba.general)
  • Re: WCHAR
    ... You can use UNICOWS to run UNICODE build under Win9x. ... I don't agree with using percentages: I use CHAR WCHAR and TCHAR - the ... jobs involving symbol fonts where the ...W and ....A assume different ... nevertheless, with a view to the future, saves all text in its data files ...
    (microsoft.public.vc.language)
  • Re: Window types
    ... typedef WCHAR TCHAR, * PTCHAR; ... typedef char TCHAR, * PTCHAR; ... Under a Unicode build, ... If the only text your app needs to deal with can be handled with ASCII ...
    (microsoft.public.vc.language)
  • Re: TCHAR and buffer overflows
    ... > This would be a problem if you hadn't defined UNICODE in your build. ... > Check your factory headers for TCHAR defs and such, ... checked whether the MSVCRT memcpyimplementation actually detects overlapping ... Or good tools, lousy user, lousy work. ...
    (comp.security.misc)
  • Re: TCHAR and buffer overflows
    ... > This would be a problem if you hadn't defined UNICODE in your build. ... > Check your factory headers for TCHAR defs and such, ... checked whether the MSVCRT memcpyimplementation actually detects overlapping ... Or good tools, lousy user, lousy work. ...
    (comp.os.ms-windows.nt.admin.security)