Mupdf Explored

Total Page:16

File Type:pdf, Size:1020Kb

Mupdf Explored MuPDF Explored Robin Watts July 30, 2021 Preface This is the beginnings of a book on MuPDF. It is far from complete, but offers useful information as far as it goes. We offer it with the latest release of MuPDF (currently 1.13) in the hopes it will be useful. Any feedback, corrections or suggestions are welcome. Please visit bugs. ghostscript.com and open a bug with \MuPDF" as the product, and \Docu- mentation" as the component. We will endeavour to make new versions available from the Documentation section of mupdf.com as they appear. i Acknowledgements Many thanks are due to Tor Andersson for creating MuPDF, to everyone who has contributed to it over the years, and to all my colleagues at Artifex Software for providing an environment in which it could grow, and nursing it through to maturity. Particular thanks are due to Sebastian Rasmussen for patiently proof-reading the book through its many revisions, and suggesting numerous improvements. Finally, many thanks are due to Helen Rogers, for putting up with me. ii Contents Prefacei Acknowledgements ii 1 Introduction1 1.1 What is MuPDF?...........................1 1.2 License.................................1 1.3 Dependencies.............................3 2 About this book5 I The MuPDF C API6 3 Quick Start7 3.1 How to open a document and render some pages.........7 4 Naming Conventions8 4.1 Prefixes................................8 4.2 Naming................................8 4.3 Types................................. 10 5 The Context 11 5.1 Overview............................... 11 5.2 Creation................................ 12 5.3 Custom Allocators.......................... 13 5.4 Multi-threading............................ 13 5.5 Cloning................................ 15 5.6 Destruction.............................. 16 5.7 Tuning................................. 17 5.8 Summary............................... 19 6 Error handling 20 6.1 Overview............................... 20 iii CONTENTS iv 6.1.1 Why is fz var necessary?.................. 22 6.1.2 Example: How to protect local variables with fz var ... 23 6.2 Throwing exceptions......................... 24 6.3 Handling exceptions......................... 25 6.4 Summary............................... 26 7 Memory Management and The Store 27 7.1 Overview............................... 27 7.2 Creating the Store.......................... 28 7.3 Reacting to Out of Memory events................. 28 7.3.1 Implementation........................ 28 8 The Document interface 29 8.1 Overview............................... 29 8.2 Opening/Closing a document.................... 29 8.3 Handling password protected documents.............. 31 8.4 Handling reflowable documents................... 31 8.5 Getting Pages from a document................... 33 8.6 Anatomy of a Page.......................... 34 8.7 Color Considerations......................... 34 8.8 Rendering Pages........................... 35 8.9 Presentations............................. 37 8.9.1 Querying........................... 37 8.9.2 Helper functions....................... 38 9 The Device interface 39 9.1 Overview............................... 39 9.2 Device Methods............................ 40 9.3 Cookie................................. 40 9.3.1 Detecting errors....................... 41 9.3.2 Using the cookie with threads................ 41 9.3.3 Using the cookie to control partial rendering....... 42 9.4 Device Hints............................. 42 9.5 Inbuilt Devices............................ 43 9.5.1 BBox Device......................... 43 9.5.2 Draw Device......................... 44 9.5.3 Display List Device...................... 46 9.5.4 PDF Output Device..................... 46 9.5.5 Structured Text Device................... 47 9.5.6 SVG Output Device..................... 48 9.5.7 Test Device.......................... 48 9.5.8 Trace Device......................... 50 10 Building Blocks 52 10.1 Overview............................... 52 10.2 Colorspaces.............................. 52 CONTENTS v 10.2.1 Basic Colorspaces...................... 52 10.2.2 Indexed Colorspaces..................... 53 10.2.3 Separation and DeviceN Colorspaces............ 53 10.2.4 Further information..................... 53 10.3 Pixmaps................................ 54 10.3.1 Overview........................... 54 10.3.2 Premultiplied alpha..................... 55 10.3.3 Saving............................. 55 10.4 Bitmaps................................ 55 10.5 Halftones............................... 56 10.6 Images................................. 57 10.7 Buffers................................. 57 10.8 Transforms.............................. 57 10.9 Paths................................. 63 10.10Text.................................. 64 10.11Shadings................................ 66 11 Display Lists 67 11.1 Overview............................... 67 11.2 Creation................................ 67 11.3 Playback................................ 68 11.4 Reference counting.......................... 69 11.5 Miscellaneous operations....................... 70 12 The Stream interface 72 12.1 Overview............................... 72 12.2 Creation................................ 72 12.3 Usage................................. 74 12.3.1 Reading bytes......................... 74 12.3.2 Reading objects........................ 76 12.3.3 Reading bits......................... 77 12.3.4 Reading whole streams.................... 78 12.3.5 Seeking............................ 79 12.3.6 Meta data........................... 80 12.3.7 Destruction.......................... 81 13 The Output interface 82 13.1 Overview............................... 82 13.2 Creation................................ 82 13.3 Usage................................. 84 13.3.1 Writing bytes......................... 84 13.3.2 Writing objects........................ 84 13.3.3 Writing strings........................ 85 13.3.4 Seeking............................ 86 14 Rendered Output Formats 87 CONTENTS vi 14.1 Overview............................... 87 14.2 Band Writers............................. 88 14.3 PNM.................................. 89 14.4 PAM.................................. 90 14.5 PBM.................................. 90 14.6 PKM.................................. 90 14.7 PNG.................................. 91 14.8 PSD.................................. 92 14.9 PWG/CUPS............................. 92 14.9.1 Contone............................ 94 14.9.2 Mono............................. 95 14.10TGA.................................. 96 14.11PCL.................................. 97 14.11.1 Color............................. 98 14.11.2 Mono............................. 99 14.12Postscript............................... 99 15 The Document Writer interface 101 15.1 Usage................................. 101 15.2 Implementation............................ 103 16 Progressive Mode 106 16.1 Overview............................... 106 16.2 Implementation............................ 107 16.2.1 Progressive Streams..................... 107 16.2.2 Rough renderings....................... 108 16.2.3 Directed downloads..................... 108 16.2.4 Example implementation.................. 110 17 Fonts 112 17.1 Overview............................... 112 17.2 Inbuilt Fonts............................. 113 17.3 Implementation............................ 114 18 Build configuration 115 18.1 Overview............................... 115 18.2 Configuration file........................... 115 18.3 Plotter selection........................... 116 18.4 Document handlers.......................... 117 18.5 JPEG 2000 support......................... 117 18.6 Javascript............................... 118 18.7 Fonts.................................. 118 19 Annotations, Links and Interaction 120 19.1 Overview............................... 120 19.2 Fitz-level Links............................ 121 CONTENTS vii 19.3 Fitz-level Annotations........................ 122 19.4 PDF-level Annotations and Widgets................ 122 19.4.1 How to operate at the PDF level.............. 122 19.4.2 PDF Annotations...................... 123 19.4.3 Annotation Values vs Appearances............. 124 19.4.4 Updating annotations.................... 125 19.5 PDF Annotation operations..................... 125 19.5.1 PDF Widgets......................... 126 19.5.2 Events............................. 127 19.5.3 Event Callback........................ 129 II MuPDF Internals 131 20 The Image interface 132 20.1 Overview............................... 132 20.2 Standard Image Types........................ 134 20.2.1 Compressed.......................... 134 20.2.2 Decoded............................ 136 20.2.3 Display List.......................... 137 20.3 Creating Images........................... 137 20.4 Implementing an Image Type.................... 139 20.5 Image Caching............................ 142 21 The Document Handler interface 143 21.1 Overview............................... 143 21.2 Implementing a Document Handler................. 144 21.2.1 Recognize and Open..................... 144 21.2.2 Document Level Functions................. 146 21.2.3 Page Level Functions..................... 149 21.3 Standard Document Handlers.................... 152 21.3.1 PDF.............................. 152 21.3.2 XPS.............................. 153 21.3.3 EPUB............................. 153 21.3.4 HTML............................. 153 21.3.5 SVG.............................. 153 21.3.6 Image............................. 153 21.3.7 CBZ.............................. 153 22 Store
Recommended publications
  • A Method to Accommodate Backward Compatibility on the Learning Application-Based Transliteration to the Balinese Script
    (IJACSA) International Journal of Advanced Computer Science and Applications, Vol. 12, No. 6, 2021 A Method to Accommodate Backward Compatibility on the Learning Application-based Transliteration to the Balinese Script 1 3 4 Gede Indrawan , I Gede Nurhayata , Sariyasa I Ketut Paramarta2 Department of Computer Science Department of Balinese Language Education Universitas Pendidikan Ganesha (Undiksha) Universitas Pendidikan Ganesha (Undiksha) Singaraja, Indonesia Singaraja, Indonesia Abstract—This research proposed a method to accommodate transliteration rules (for short, the older rules) from The backward compatibility on the learning application-based Balinese Alphabet document 1 . It exposes the backward transliteration to the Balinese Script. The objective is to compatibility method to accommodate the standard accommodate the standard transliteration rules from the transliteration rules (for short, the standard rules) from the Balinese Language, Script, and Literature Advisory Agency. It is Balinese Language, Script, and Literature Advisory Agency considered as the main contribution since there has not been a [7]. This Bali Province government agency [4] carries out workaround in this research area. This multi-discipline guidance and formulates programs for the maintenance, study, collaboration work is one of the efforts to preserve digitally the development, and preservation of the Balinese Language, endangered Balinese local language knowledge in Indonesia. The Script, and Literature. proposed method covered two aspects, i.e. (1) Its backward compatibility allows for interoperability at a certain level with This study was conducted on the developed web-based the older transliteration rules; and (2) Breaking backward transliteration learning application, BaliScript, for further compatibility at a certain level is unavoidable since, for the same ubiquitous Balinese Language learning since the proposed aspect, there is a contradictory treatment between the standard method reusable for the mobile application [8], [9].
    [Show full text]
  • Vulnerability Report Attacks Bypassing Confidentiality in Encrypted PDF
    Vulnerability Report Attacks bypassing confidentiality in encrypted PDF Jens M¨uller1, Fabian Ising2, Vladislav Mladenov1, Christian Mainka1, Sebastian Schinzel2, J¨orgSchwenk1 May 16, 2019 1Chair for Network and Data Security 2FH M¨unsterUniversity of Applied Sciences Abstract In this report, we analyze PDF encryption and show two novel techniques for breaking the confidentiality of encrypted documents. Firstly, we abuse the PDF feature of partially encrypted documents to wrap the encrypted part of the document within attacker-controlled content and therefore, exfiltrate the plaintext once the document is opened by a legitimate user. Secondly, we abuse a flaw in the PDF encryption specification allowing an attacker to arbitrarily manipulate encrypted content without knowing the cor- responding key/password. The only requirement is one single block of known plaintext, which we show is fulfilled by design. By using exfiltration channels our attacks allow the recovery of the entire plaintext or parts of it within an encrypted document. The attacks rely only on standard compliant PDF features. We evaluated our attacks on 27 widely used PDF viewers and found all of them vulnerable. 1 Contents 1 Background4 1.1 Portable Document Format (PDF) . .4 1.2 PDF Encryption . .6 1.3 PDF Interactive Features . .7 2 Attacker Model8 3 PDF Encryption: Security Analysis9 3.1 Partial Encryption . .9 3.2 CBC Malleability . 10 3.3 PDF Interactive Features . 12 4 How To Break PDF Encryption 14 4.1 Direct Exfiltration (Attack A) . 14 4.1.1 Requirements . 15 4.1.2 Direct Exfiltration through PDF Forms (A1) . 15 4.1.3 Direct Exfiltration via Hyperlinks (A2) .
    [Show full text]
  • Open Source License Report on the Product
    OPEN SOURCE LICENSE REPORT ON THE PRODUCT The software included in this product contains copyrighted software that is licensed under the GPLv2, GPLv3, gSOAP Public License, jQuery, PHP License 3.01, FTL, BSD 3-Clause License, Public Domain, MIT License, OpenSSL Combined License, Apache 2.0 License, zlib/libpng License, , . You may obtain the complete corresponding source code from us for a period of three years after our last shipment of this product by sending email to: [email protected] If you want to obtain the complete corresponding source code with a physical medium such as CD-ROM, the cost of physically performing source distribution might be charged. For more details about Open Source Software, refer to eneo website at www.eneo-security.com, the product CD and manuals. GPLv2: u-Boot 2013.07, Linux Kernel 3.10.55, busybox 1.20.2, ethtool 3.10, e2fsprogs 1.41.14, mtd-utils 1.5.2, lzo 2.05, nfs-utils 1.2.7, cryptsetup 1.6.1, udhcpd 0.9.9 GPLv3: pwstrength 2.0.4 gSOAP Public License: gSOAP 2.8.10 jQuery License: JQuery 2.1.1, JQuery UI 1.10.4 PHP: PHP 5.4.4 FTL (FreeType License): freetype 2.4.10 BSD: libtirpc 0.2.3, rpcbind 0.2.0, lighttpd 1.4.32, hdparm 9,45, hostpad 2, wpa_supplicant 2, jsbn 1.4 Public Domain: sqlite 3.7.17 zlib: zlib 1.2.5 MIT:pwstrength 2.0.4, ezxml 0.8.6, bootstrap 3.3.4, jquery-fullscreen 1.1.5, jeditable 1.7.1, jQuery jqGrid 4.6.0, fullcalendar 2.2.0, datetimepicker 4.17.42, clockpicker 0.0.7, dataTables 1.0.2, dropzone 3.8.7, iCheck 1.0.2, ionRangeSlider 2.0.13, metisMenu 2.0.2, slimscroll 1.3.6, sweetalert 2015.11, Transitionize 0.0.2 , switchery 0.0.2, toastr 2.1.0, animate 3.5.0, font-awesome 4.3.0, Modernizr 2.7.1 pace 1.0.0 OpenSSL Combined: openssl 1.0.1h Apache license 2.0: datepicker 1.4.0, mDNSResponder 379.32.1 wish), that you receive source reflect on the original authors' GNU GENERAL PUBLIC code or can get it if you want it, reputations.
    [Show full text]
  • B.Casselman,Mathematical Illustrations,A Manual Of
    1 0 0 setrgbcolor newpath 0 0 1 0 360 arc stroke newpath Preface 1 0 1 0 360 arc stroke This book will show how to use PostScript for producing mathematical graphics, at several levels of sophistication. It includes also some discussion of the mathematics involved in computer graphics as well as a few remarks about good style in mathematical illustration. To explain mathematics well often requires good illustrations, and computers in our age have changed drastically the potential of graphical output for this purpose. There are many aspects to this change. The most apparent is that computers allow one to produce graphics output of sheer volume never before imagined. A less obvious one is that they have made it possible for amateurs to produce their own illustrations of professional quality. Possible, but not easy, and certainly not as easy as it is to produce their own mathematical writing with Donald Knuth’s program TEX. In spite of the advances in technology over the past 50 years, it is still not a trivial matter to come up routinely with figures that show exactly what you want them to show, exactly where you want them to show it. This is to some extent inevitable—pictures at their best contain a lot of information, and almost by definition this means that they are capable of wide variety. It is surely not possible to come up with a really simple tool that will let you create easily all the graphics you want to create—the range of possibilities is just too large.
    [Show full text]
  • Living Without Google on Android
    Alternative for Google Apps on Android - living without Google on Android Android without any Google App? What to use instead of Hangouts, Map, Gmail? Is that even possible? And why would anyone want to live without Google? I've been using a lot of different custom ROMs on my devices, so far the two best: plain Cyanogenmod 11 snapshot on the Nexus 4[^1], and MIUI 2.3.2 on the HTC Desire G7[^2]. All the others ( MUIU 5, MIUI 6 unofficial, AOKP, Kaos, Slim, etc ) were either ugly, unusable, too strange or exceptionally problematic on battery life. For a long time, the first step for me was to install the Google Apps, gapps packages for Plays Store, Maps, and so on, but lately they require so much rights on the phone that I started to have a bad taste about them. Then I started to look for alternatives. 1 of 5 So, what to replace with what? Play Store I've been using F-Droid[^3] as my primary app store for a while now, but since it's strictly Free Software[^4] store only, sometimes there's just no app present for your needs; aptoide[^5] comes very handy in that cases. Hangouts I never liked Hangouts since the move from Gtalk although for a little while it was exceptional for video - I guess it ended when the mass started to use it in replacement of Skype and its recent suckyness. For chat only, check out: ChatSecure[^6], Conversations[^7] or Xabber[^8]. All of them is good for Gtalk-like, oldschool client and though Facebook can be configured as XMPP as well, I'd recommend Xabber for that, the other two is a bit flaky with Facebook.
    [Show full text]
  • The Unicode Cookbook for Linguists: Managing Writing Systems Using Orthography Profiles
    Zurich Open Repository and Archive University of Zurich Main Library Strickhofstrasse 39 CH-8057 Zurich www.zora.uzh.ch Year: 2017 The Unicode Cookbook for Linguists: Managing writing systems using orthography profiles Moran, Steven ; Cysouw, Michael DOI: https://doi.org/10.5281/zenodo.290662 Posted at the Zurich Open Repository and Archive, University of Zurich ZORA URL: https://doi.org/10.5167/uzh-135400 Monograph The following work is licensed under a Creative Commons: Attribution 4.0 International (CC BY 4.0) License. Originally published at: Moran, Steven; Cysouw, Michael (2017). The Unicode Cookbook for Linguists: Managing writing systems using orthography profiles. CERN Data Centre: Zenodo. DOI: https://doi.org/10.5281/zenodo.290662 The Unicode Cookbook for Linguists Managing writing systems using orthography profiles Steven Moran & Michael Cysouw Change dedication in localmetadata.tex Preface This text is meant as a practical guide for linguists, and programmers, whowork with data in multilingual computational environments. We introduce the basic concepts needed to understand how writing systems and character encodings function, and how they work together. The intersection of the Unicode Standard and the International Phonetic Al- phabet is often not met without frustration by users. Nevertheless, thetwo standards have provided language researchers with a consistent computational architecture needed to process, publish and analyze data from many different languages. We bring to light common, but not always transparent, pitfalls that researchers face when working with Unicode and IPA. Our research uses quantitative methods to compare languages and uncover and clarify their phylogenetic relations. However, the majority of lexical data available from the world’s languages is in author- or document-specific orthogra- phies.
    [Show full text]
  • Font HOWTO Font HOWTO
    Font HOWTO Font HOWTO Table of Contents Font HOWTO......................................................................................................................................................1 Donovan Rebbechi, elflord@panix.com..................................................................................................1 1.Introduction...........................................................................................................................................1 2.Fonts 101 −− A Quick Introduction to Fonts........................................................................................1 3.Fonts 102 −− Typography.....................................................................................................................1 4.Making Fonts Available To X..............................................................................................................1 5.Making Fonts Available To Ghostscript...............................................................................................1 6.True Type to Type1 Conversion...........................................................................................................2 7.WYSIWYG Publishing and Fonts........................................................................................................2 8.TeX / LaTeX.........................................................................................................................................2 9.Getting Fonts For Linux.......................................................................................................................2
    [Show full text]
  • Opentype Postscript Fonts with Unusual Units-Per-Em Values
    Luigi Scarso VOORJAAR 2010 73 OpenType PostScript fonts with unusual units-per-em values Abstract Symbola is an example of OpenType font with TrueType OpenType fonts with Postscript outline are usually defined outlines which has been designed to match the style of in a dimensionless workspace of 1000×1000 units per em Computer Modern font. (upm). Adobe Reader exhibits a strange behaviour with pdf documents that embed an OpenType PostScript font with A brief note about bitmap fonts: among others, Adobe unusual upm: this paper describes a solution implemented has published a “Glyph Bitmap Distribution Format by LuaTEX that resolves this problem. (BDF)” [2] and with fontforge it’s easy to convert a bdf font into an opentype one without outlines. A fairly Keywords complete bdf font is http://unifoundry.com/unifont-5.1 LuaTeX, ConTeXt Mark IV, OpenType, FontMatrix. .20080820.bdf.gz: this Vle can be converted to an Open- type format unifontmedium.otf with fontforge and it Introduction can inspected with showttf, a C program from [3]. Here is an example of glyph U+26A5 MALE AND FEMALE Opentype is a font format that encompasses three kinds SIGN: of widely used fonts: 1. outline fonts with cubic Bézier curves, sometimes Glyph 9887 ( uni26A5) starts at 492 length=17 referred to CFF fonts or PostScript fonts; height=12 width=8 sbX=4 sbY=10 advance=16 2. outline fonts with quadratic Bézier curve, sometimes Bit aligned referred to TrueType fonts; .....*** 3. bitmap fonts. ......** .....*.* Nowadays in digital typography an outline font is almost ..***... the only choice and no longer there is a relevant diUer- .*...*.
    [Show full text]
  • Ghostscript and Mupdf Status Openprinting Summit April 2016
    Ghostscript and MuPDF Status OpenPrinting Summit April 2016 Michael Vrhel, Ph.D. Artifex Software Inc. San Rafael CA Outline Ghostscript overview What is new with Ghostscript MuPDF overview What is new with MuPDF MuPDF vs Ghostscript MuJS, GSView The Basics Ghostscript is a document conversion and rendering engine. Written in C ANSI 1989 standard (ANS X3.159-1989) Essential component of the Linux printing pipeline. Dual AGPL/Proprietary licensed. Artifex owns the copyright. Source and documentation available at www.ghostscript.com Graphical Overview PostScript PCL5e/c with PDF 1.7 XPS Level 3 GL/2 and RTL PCLXL Ghostscript Graphics Library High level Printer drivers: Raster output API: Output drivers: Inkjet TIFF PSwrite PDFwrite Laser JPEG XPSwrite Custom etc. CUPS Devices Understanding devices is a major key to understanding Ghostscript. Devices can have high-level functionality. e.g. pdfwrite can handle text, images, patterns, shading, fills, strokes and transparency directly. Graphics library has “default” operations. e.g. text turns into bitmaps, images decomposed into rectangles. In embedded environments, calls into hardware can be made. Raster devices require the graphics library to do all the rendering. Relevant Changes to GS since last meeting…. A substantial revision of the build system and GhostPDL directory structure (9.18) GhostPCL and GhostXPS "products" are now built by the Ghostscript build system "proper" rather than having their own builds (9.18) New method of internally inserting devices into the device chain developed. Allows easier implementation of “filter” devices (9.18) Implementation of "-dFirstPage"/"-dLastPage" with all input languages (9.18) Relevant Changes to GS since last meeting….
    [Show full text]
  • Surviving the TEX Font Encoding Mess Understanding The
    Surviving the TEX font encoding mess Understanding the world of TEX fonts and mastering the basics of fontinst Ulrik Vieth Taco Hoekwater · EuroT X ’99 Heidelberg E · FAMOUS QUOTE: English is useful because it is a mess. Since English is a mess, it maps well onto the problem space, which is also a mess, which we call reality. Similary, Perl was designed to be a mess, though in the nicests of all possible ways. | LARRY WALL COROLLARY: TEX fonts are mess, as they are a product of reality. Similary, fontinst is a mess, not necessarily by design, but because it has to cope with the mess we call reality. Contents I Overview of TEX font technology II Installation TEX fonts with fontinst III Overview of math fonts EuroT X ’99 Heidelberg 24. September 1999 3 E · · I Overview of TEX font technology What is a font? What is a virtual font? • Font file formats and conversion utilities • Font attributes and classifications • Font selection schemes • Font naming schemes • Font encodings • What’s in a standard font? What’s in an expert font? • Font installation considerations • Why the need for reencoding? • Which raw font encoding to use? • What’s needed to set up fonts for use with T X? • E EuroT X ’99 Heidelberg 24. September 1999 4 E · · What is a font? in technical terms: • – fonts have many different representations depending on the point of view – TEX typesetter: fonts metrics (TFM) and nothing else – DVI driver: virtual fonts (VF), bitmaps fonts(PK), outline fonts (PFA/PFB or TTF) – PostScript: Type 1 (outlines), Type 3 (anything), Type 42 fonts (embedded TTF) in general terms: • – fonts are collections of glyphs (characters, symbols) of a particular design – fonts are organized into families, series and individual shapes – glyphs may be accessed either by character code or by symbolic names – encoding of glyphs may be fixed or controllable by encoding vectors font information consists of: • – metric information (glyph metrics and global parameters) – some representation of glyph shapes (bitmaps or outlines) EuroT X ’99 Heidelberg 24.
    [Show full text]
  • Katowice 2015
    Więcej o książce CENA 28 ZŁ ISSN 0208-6336 (+ VAT) ISBN 978-83-8012-387-8 KATOWICE 2015 NR 3469 KATOWICE 2015 Redaktor serii: Językoznawstwo Polonistyczne Bożena Witosz Recenzentka Piotra Łobacz Wstęp Międzynarodowy alfabet fonetyczny (dalej: IPA) jest powszechnie znanym systemem transkrypcji stosowanym w różnych dziedzinach badań nad mową, lecz bardzo rzadko używanym w obrębie językoznawstwa polskiego, nie tylko w badaniach nad językiem polskim, ale także nad innymi językami słowiań­ skimi. Co więcej, nie dysponujemy, poza jednym wyjątkiem (Żurawski, red., 2011), polskim opracowaniem zawierającym obecnie obowiązujące symbole alfabetu międzynarodowego. Zestawy symboli opublikowane w pracach Wiktora Jassema (zob. bibliografia), w Słowniku wymowy polskiej PWN (SWP, 1977) oraz Encyklopedii językoznawstwa ogólnego (EJO, 1999), a także w wielu podręcznikach zdezaktualizowały się po 1989 roku. Zresztą nawet w opra­ cowaniu Język polski. Nauka o języku (Żurawski, red., 2011) nie znajdziemy wszystkich symboli IPA ani bardzo potrzebnych wskazówek dotyczących tego alfabetu (sposobu stawiania symboli oraz opisu ich budowy graficznej). Zadanie omówienia IPA jest bardzo skomplikowane, ponieważ nie wystarczy podać wartości samych symboli (a jest ich bardzo dużo, bo ponad 2501), ale trzeba także wyjaśnić sposób ich użycia (szczególnie ważne jest to w przy­ padku diakrytów), ich budowę (to z kolei jest istotne w przypadku nietypo­ wych liter typu <ʒ ɟ>), znaczenie angielskich terminów fonetycznych stoso­ wanych w opisie symboli IPA (nie ma tutaj pełnej jednoznaczności względem terminów polskich), sposoby konstruowania symboli fonetycznych w edyto­ rach tekstu (od czcionek komputerowych, tzw. fontów, zawierających sym­ bole IPA począwszy, na sposobach pozycjonowania znaków diakrytycznych skończywszy). Tak zaprojektowana monografia byłaby jednak niepraktyczna: zawierałaby ogromną ilość informacji, z których przeciętny użytkownik alfa­ betu fonetycznego nie skorzystałby, a już na pewno nie studiowałby ich po to tylko, by wstawić do swojego tekstu kilka symboli fonetycznych.
    [Show full text]
  • Optimization of Fontconfig Library Optimization of Fontconfig Library
    Michal Srb OPTIMIZATION OF FONTCONFIG LIBRARY OPTIMIZATION OF FONTCONFIG LIBRARY Michal Srb Bachelor's Thesis Spring 2017 Information Technology Oulu University of Applied Sciences ABSTRACT Oulu University of Applied Sciences Degree Programme in Information Technology, Internet Services Author: Michal Srb Title of the bachelor’s thesis: Optimization of Fontconfig Library Supervisor: Teemu Korpela Term and year of completion: Spring 2017 Number of pages: 39 + 1 appendix Fontconfig is a library that manages a database of fonts on Linux systems. The aim of this Bachelor's thesis was to explore options for making it respond faster to application's queries. The library was identified as a bottleneck during the startup of graphical applications. The typical usage of the library by applications was analyzed and a set of standalone benchmarks were created. The library was profiled to identify hot spots and multiple optimizations were applied to it. It was determined that to achieve an optimal performance, a complete rewrite would be necessary. However, that could not be done while staying backward compatible. Nevertheless, the optimizations applied to the existing fontconfig yielded significant performance improvements, up to 98% speedups in benchmarks based on the real-world usage. Keywords: fontconfig, optimization, benchmarking, profiling 3 CONTENTS 1 INTRODUCTION 6 2 BACKGROUND 7 1.1 Motivation 7 1.2 Fontconfig 8 1.2.1 Function 9 1.2.2 Configuration 11 2 ANALYSIS 12 2.1 Main entry functions 12 2.1.1 FcFontMatch 12 2.1.2 FcFontSort 14 2.1.3
    [Show full text]