[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Devel] Unicode and outline morphing
From: |
Eric Olson |
Subject: |
Re: [Devel] Unicode and outline morphing |
Date: |
Wed, 24 Jan 2001 21:25:23 -0400 |
Hi Nishanta,
I'm sorry we're not jumping over each other to help out but your
description is still lacking a bit to give help effectively.
For example, when you say
>1. how can I get unicode/multi byte chars sets working thru FT. I have
>set the encoding style and selected the code page but haven't had much
>success.
what is the problem exactly? Did you write the program? Is it based on
one of the demo programs? Does it show anything? Does it work for
low-ascii? What font(s) are you using? What format? Do you have a
specific piece of code we could look at? (please don't send it to the
list if it is more than a snippet)
>The same goes for Hi Ascii char sets such as ( on notepad <ALT>0241 --
>tilda over n ). What must I setup and is there a specific
>order to do so... ?
(ok I guess this confirms you are using windows)
Just as an example, do you have ftstring compiled on your machine?
When I give the command line:
ftstring 16 c:\windows\fonts\arial.ttf "Test: mañana!"
It works on-screen. (In fact, I'm simplifying, I use a different
codepage so at the command line I must type ma±ana). You'll see in the
code of ftstring.c that you too can retrieve the corresponding glyph of
your "hi-ascii" char. The first technique promotes your char to a
short. It presumes that your char is in iso8559-1 (mostly
corresponding to the windows commandline codepage but it may vary
according to localization) and therefore simply mappable to unicode.
#if 1
glyph_code[n] = TT_Char_Index( char_map, (short)source[n] );
#else
/* Note, if you have a function, say ToUnicode(), to convert from
*/
/* char codes to Unicode, use the following line instead:
*/
glyph_code[n] = TT_Char_Index( char_map, ToUnicode( source[n] ) );
#endif
If your original character set/codepage is different, the mapping to
unicode may be more involved (that's where you decide to write your
ToUnicode function and uncomment the second glyph_code line). We would
need more information to help with this.
Basically, if you can tell us what you do and what output you get,
we'll be able to help you more. If it is only in the conceptual stages,
we can only say, yes it is possible.
>2. Could you or any one also tell me how I could add/modify the
>contours of the glyph itself ( Is this possible ). This way I could
>have underlined text even on curved paths or I could get the glyph to
>morph to the base line etc.
>Any ideas.
>3. Leonard could you please send me the code fragment for underlining and
>strikethru.
I'll let others address these two issues.
>Thanks for your help.
>Nishanta Abeysinghe
You're welcome.
Eric