Chapter 13. Examples of I18N
108
13.4 A Quasi Wrapper to Internationalize Text Output of X Clients
The author of this section is Tomohiro KUBOTA (
).
13.4.1 Introduction
X11 supplies
XFontSet
 related internationalized functions for text output. However, many X
clients use conventional
XFontStruct
 related non internationalized functions and cannot out 
put languages which need multiple fonts (Chinese, Japanese, and Korean).
Now I introduce a wrapper which easily modify non internationalized X clients to use interna 
tionalized X11 functions.
13.4.2 Strategy
Almost
XFontStruct
 related functions can be replaced easily by
XFontSet
 related functions.
  XFontStruct  > XFontSet
  XLoadQueryFont()  > XCreateFontSet()
  XFreeFont()  > XFreeFontSet()
  XDrawString()  > XmbDrawString()
  XDrawImageString()  > XmbImageString()
  XTextExtents()  > XmbTextExtents()
  XTextWidth()  > XmbTextEscapement()
However, there were several problems.
1. The font for
XDrawString
is specified by
GC
parameter, while
XFontSet
parameter is used
for
XmbDrawString
.
2.
XFontSet
does not have structure members of
ascent
and
descent
, while
XFontStruct
has them and these members are often referred.
3. Many software specify font name with iso8859 1 specific way. This avoids 'fontset' related
functions work fully and disables non iso8859 1 languages be displayed.






footer




 

 

 

 

 Home | About Us | Network | Services | Support | FAQ | Control Panel | Order Online | Sitemap | Contact

indiana web hosting

 

Our partners: PHP: Hypertext Preprocessor Best Web Hosting Java Web Hosting Inexpensive Web Hosting  Jsp Web Hosting

Cheapest Web Hosting Jsp Hosting Cheap Hosting

Visionwebhosting.net Business web hosting division of Web Design Plus. All rights reserved