[Your Title Here]

[Your Title Here]

Belegarbeit The L4 Font Server Henrik Malecha 25th July 2005 Technische Universität Dresden Department of Computer Science Operating Systems Group Supervising Professor: Prof. Dr. rer. nat. Hermann Härtig Supervisor: Dipl.-Inf. Norman Feske, Dipl.-Inf. Christian Helmuth Erklärung Hiermit erkläre ich, dass ich diese Arbeit selbstständig erstellt und keine anderen als die angegebenen Hilfsmittel benutzt habe. Dresden, den 25th July 2005 Henrik Malecha Contents 1 Introduction 1 1.1 Overview . 1 1.2 Layout . 2 2 State of the art 3 2.1 History of fonts . 3 2.2 Font Terminology . 3 2.2.1 Outlines and geometric aspects . 4 2.2.2 Glyph metrics . 7 2.2.3 Kerning . 8 2.3 Unicode . 9 2.4 FreeType2 . 10 2.5 Fonts in Linux . 10 2.5.1 XLFD . 11 2.5.2 Font Systems . 11 2.5.3 Xfontsel . 11 2.5.4 Fontconfig . 12 3 Design 13 3.1 Design Goals . 13 3.1.1 Library-based design . 14 3.1.2 Server-based design . 14 3.2 Design Decisions . 15 3.2.1 Internal Server Structure . 15 3.2.2 Interface . 16 3.2.3 Client Library . 17 3.2.4 Font Loading . 18 3.2.5 Font Selection . 20 3.2.6 A Session . 21 3.2.7 Unicode Support . 22 3.2.8 Example Tools . 22 3.2.9 Dfontsel . 23 3.2.10 SPet - Simple Performance Tester . 23 V Contents 4 Implementation 25 4.1 Porting Freetype2 . 25 4.2 Glyph Bitmap Transfer . 25 4.2.1 IPC vs. Dataspace . 25 4.2.2 Glyph Buffer Structure . 27 4.2.3 Larger Strings . 27 4.3 Handling Clients . 28 4.4 Supporting Font Modules . 29 4.5 Serial vs. Parallel . 30 4.5.1 Load Fonts . 31 4.6 Font Selection . 31 4.7 Kerning . 33 5 Evaluation 35 5.1 Performance . 35 5.2 Security . 36 6 Conclusion and Outlook 39 6.1 Conclusion . 39 6.2 Future Work . 39 6.2.1 Internal Challenges . 40 6.2.2 Client-Side Challenges . 41 Bibliography 43 VI List of Figures 2.1 Glyph metrics . 7 2.2 Without and with kerning . 8 3.1 Design scheme of the L4 Font Server . 15 3.2 Font family list . 20 4.1 Shared memory scheme . 26 4.2 Font selection modes . 31 4.3 Principle of get_kerning ........................... 32 VII 1 Introduction 1.1 Overview Font management and electronic typesetting is a widespread field. Different fonts for different languages, like English, Greek or more complex types like Arabic or Asian one’s with a huge amount of letters make it a big challenge for programmers that want to localize their programs to other languages. Fonts must be scalable and should always look the same, regardless of their size. Take for example the traditional X fonts used in terminals. They always have the same distance and are only fixed font sizes, and that is not desirable in a contemporary typesetting. To the humans eyes, font files with variable symbol distances are more readable and comfort- able. Furthermore, a today’s font has to be scalable to any size and modern font renderers are often required to support anti-aliasing for letter smoothing. Font formats like Adobe’s Type 1 or Apple’s True-Type present such more sophisticated ways of font handling. Nowadays, computer systems are often required to use these scalable, variable-spaced fonts, because fonts are an integral part of a computer system, as they are used to present information to the user. When reading or creating documents, like manuals or letters, surfing in the Internet or writing e-mails or even if you work with the operating system, you are always confronted with fonts. Moreover, as there are many different languages on the world, using various scripts that vary highly in their count of symbols, it is a real challenge to cope with internationalization. In the early years, computers generally supported the ASCII character set. This provides the user with Latin characters, necessary for typing in the English language. ASCII only consists of 127 characters, which means that 7 bits of a byte are used in that code. This has historical reasons, because, in the beginning of the usage of ASCII, there were computers that handled 7-bit words. Later, the eighth bit was often used as a parity bit. The problem is that just the fewest languages have such a small number of letters as English has. Perhaps, one of the most extreme example is the Chinese type with its over 70000 symbols. Alternative methods of character representation had to come up, which resulted in the Unicode Project and the ISO 10646 standard, for example. My thesis deals with the font support for the L4 environment. The L4 system has been devel- oped by the OS Group of the Departure of Computer Science at the Dresden University of Technology. It is build on top of a so-called microkernel, Fiasco by name. For more informa- tion about the system, look at [L4e01]. The goal of the thesis is to develop a server that provides clients with fonts. Concretely, this means that a client can request rendered bitmaps of characters in a font he chooses out of a font list, the server offers. Moreover, the server shall be able to handle international character sets, not only the standard ASCII sets. 1 1 Introduction 1.2 Layout Section 2 deals with related work in the field of fonts. It starts with a short overview about the history of fonts that is followed by an introduction into the font terminology, which is necessary, because there are some specific terms. Afterwards, some basic technologies and concepts, like FreeType2 and Unicode are introduced, that will be used within the L4 Font Server. The section closes with a look at font solutions under Linux. In Section 3, I describe the design alternatives and the final decisions about the concept of a font server implementation. The internal and external architecture are introduced and basic questions of how to use the server are answered. On the base of that, the Section 4 is a more in-depth description of several important aspects of the implementation. Section 5 tries to evaluate the implemented server. Questions of “what is good” and “where are the drawbacks” are considered. Finally, a conclusion in Section 6 summarizes the features already included and what has to be done in the future development. 2 2 State of the art In this chapter I give an overview of related work and state-of-the-art solutions in the field of font handling and rendering. After a short overview about the historical origins of fonts and type- setting, an introduction in the terminology and the basics of fonts follows. The concept of True- Type fonts has to be clarified, because it is necessary to understand the work of the font server. As well an explanation of FreeType2, an important core element of my implementation is given. For the internationalization task, I provide an insight into the Unicode Project. Afterwards, I describe how the Linux system deals with font management and challenges like scalable fonts and internationalization. 2.1 History of fonts Like many concepts that found their way into computer technology, fonts and typesetting have already been existing for a long time. As mentioned in [Fon05], the term font is derivated from the French word fonte (i. e., something that has been melt). The oldest verified notes about printing with movable type were found in China. In the 11th century, a Chinese called Bi Sheng invented movable letters. Later, in Europe, the German printer Johann Gutenberg also invented the movable type or foundry type and thereby revolu- tionized the printing technology. In foundry type each character was cast into a block of metal, which was an alloy of lead. Every block contains one letter, number or any other symbol. The look of the images on that blocks was called typeface, which is still used today. By combining the blocks, one could form pages that were inked and then used for fast reproduction. By that, books and information spread all over Europe and layed one of the cornerstones of renaissance. This technology was used for hundreds of years, until the middle of the 20th century. In the 1950s a new method came up by the photographic typesetting, which had the advantage to be scalable. Therefore, the fonts were saved on discs or rolls of film. But the era didn’t take that long, since, in the 1980s, the digital typography began their relentless conquest of typesetting. Thus, nowadays, digital typesetting is widespread and, in smaller dimensions, usable by everyone, who owns a computer and a printer. Nowadays, when we speak of fonts, we usually mean computer fonts saved in a file. We use them to present information on screens, to print documents and so on. Many terms in digital type-setting have their origin in the historical technologies. In the next section, the most important of them are explained. 2.2 Font Terminology On computers, fonts are an important part of the system, as they are used to display information in text-only environments as well as in systems with a graphical user interface. Furthermore, 3 2 State of the art more sophisticated use of fonts, for example WYSIWYG1 text editors or desktop publishing software, is widely spread and quasi-standard. Because of that, an efficient representation guar- anteeing high output quality is desired. Therefore, font designs are defined in files, which are used by diverse font handlers, which can read these files and use the fonts for character render- ing.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    51 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us