discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: 2-bytes character display ready ?


From: Yen-Ju Chen
Subject: RE: 2-bytes character display ready ?
Date: Thu, 21 Feb 2002 22:44:07 -0500

  I try not to make things more complicated.
  As far as I know, the 2bytes problem involve the encoding of string.
  Most western character need only one byte to store all the letter.
  Most eastern character need at least two bytes to store all the character.
  When xwindow read the first byte of a string
  and found the encoding belong to western character,
  it'll display this byte and read the next.
  If xwindow read the first byte and found it is the first byte of an
eastern character,
  it will read the second one and display these two bytes together.
  So the ability to know the encoding of a string is important.
  It is also important because when you press the backspace key,
  it will delete two bytes together if it is a eastern character.
  In this case, it is called "multibyte character".
  I think using NSString from frontend to backend is a good idea,
  because NSString contain the encoding information than char* string.
  I have no idea how the postscript works on these problem.

  Most i18n software use XmbDrawString function than usual XDrawString
function.
  When using XDrawString, you have to know the encoding of the string.
  Therefore, you have to programmingly find the encoding of a string,
  then you can use the right font.
  But when using XmbDrawString,
  this function will find out the encoding of a string itself.
  Therefore, put any string in XmbDrawString will minimize the work of
programmer.
  But there is no way to know which font XmbDrawString will use for each
encoding.
  The advantage of XmbDrawString is it can display different encoding string
at once.
  You can mix English, Chinese, Japanese in a string,
  then use XmbDrawString to show them together.
  XmbDrawString will find suitable fonts for each encoding.

  I'm not sure how the 'fi' work.
  But I think 'fi' corresponds to a code number in a font,
  as 'A' to another code number.
  The code number is the encoding of the font.
  When you input a 'fi', it will translate into the code number,
  then use the number to find the letter in the correct font and display the
letter.
  If you use the wrong font, the code system will not match.
  Therefore, even you input a 'fi', it may show 'si',
  because they have the same code number.

  Please correct me if it is wrong.

  Yen-Ju


> -----Original Message-----
> From: discuss-gnustep-admin@gnu.org
> [mailto:discuss-gnustep-admin@gnu.org]On Behalf Of Nicola Pero
> Sent: Thursday, February 21, 2002 9:05 PM
> To: Fred Kiefer
> Cc: discuss-gnustep@gnu.org
> Subject: Re: 2-bytes character display ready ?
>
>> I'm absolutely not taking a position on how we should do things or how we
> should interface front-end and back-end.  I need to learn a lot more about
> glyphs and fonts before I can produce any good judgement of my own about
> that.
>
> I was just exploring the basics ...
>
> how do you produce the 'fi' ligature under X with a normal font ?
> how would you produce it under Windows ? ...
> how would you produce it on a postscript printer ?
> how would you produce it on common graphical libraries ?
>
> the interface between front-end and back-end should be done in such a way
> that the frontend can tell the back-end to produce the required glyph (the
> 'fi' ligature) in the same way on all platforms, and on each platform it
> is relatively simple to implement backend code that produces the correct
> glyph from the front-end call.
>
>
> _______________________________________________
> Discuss-gnustep mailing list
> Discuss-gnustep@gnu.org
> http://mail.gnu.org/mailman/listinfo/discuss-gnustep




reply via email to

[Prev in Thread] Current Thread [Next in Thread]