12.07.2015 Views

free openSS

free openSS

free openSS

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

34 ❘ FREE/OPEN SOURCE SOFTWARE: LOCALIZATIONto the clients. X clients are GUI application programs that request X server to draw graphical objects onthe screen, and accept user inputs via the events fed by X server. Note that with this architecture, X clientand server can be on different machines in the network. In which case, X server is the machine that theuser operates with, while X client can be a process running on the same machine or on a remote machinein the network.In this client-server architecture, fonts are provided on the server side. Thus, installing fonts meansconfiguring X server by installing fonts and registering them to its font path.However, since X server is sometimes used to provide thin-client access in some deployments, where Xserver may run on cheap PCs booted by floppy or across network, or even from ROM, font installation oneach X server is not always appropriate. Thus, font service has been delegated to a separate servicecalled X Font Server (XFS). Another machine in the network can be dedicated for font service so that all Xservers can request font information. Therefore, with this structure, an X server may be configured tomanage fonts by itself or to use fonts from the font server, or both.Nevertheless, recent changes in XFree86 have addressed some requirements to manage fonts at theclient side. The Xft extension provides anti-aliased glyph images by font information provided by the Xclient. With this, the Xft extension also provides font management functionality to X clients in its firstversion. This was later split from Xft2 into a separate library called fontconfig. fontconfig is a fontmanagement system independent of X, which means it can also apply to non-GUI applications such asprinting services. Modern desktops, including KDE 3 and GNOME 2 have adopted fontconfig as their fontmanagement systems, and have benefited from closer integration in providing easy font installationprocess. Moreover, client-side fonts also allow applications to do all glyph manipulations, such as makingspecial effects, while enjoying consistent appearance on the screen and in printed outputs.The splitting of the X client-server architecture is not standard practice on stand-alone desktops. However,it is important to always keep the split in mind, to enable particular features.Output MethodsSince the usefulness of XOM is still being questioned, we shall discuss only the output methods alreadyimplemented in the two major toolkits: Pango of GTK+ 2 and Qt 3.Pango Text Layout EnginesPango [‘Pan’ means ‘all’ in English and ‘go’ means ‘language’ in Japanese] 18is a multilingual text layoutengine designed for quality text typesetting. Although it is the text drawing engine of GTK+, it can alsobe used outside GTK+ for other purposes, such as printing. 19 This section will provide localizers with abird‘s eye view of Pango. The Pango reference manual 20 should be consulted for more detail.PangoLayoutAt a high level, Pango provides the PangoLayout class that takes care of typesetting text in a column ofgiven width, as well as other information necessary for editing, such as cursor positions. Its features maybe summarized as follows:Paragraph PropertiesindentspacingalignmentText Elementsget lines and their extentsget runs and their extentscharacter search at (x, y) positionjustificationword/character wrapping modestabscharacter logical attributes (is line break, is cursor position, etc.)cursor movements18Taylor, O., ‘Pango – Design’; available from www.pango.org/design.shtml.19GNOME Development Site, ‘Pango Reference Manual’; available from developer.gnome.org/doc/API/2.0/pango/.20This is a very rough classification. Obviously, there are further steps, such as line breaking, alignment and justification. They need notbe discussed here, as they go beyond localization.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!