Skia & Freetype

Total Page:16

File Type:pdf, Size:1020Kb

Skia & Freetype Skia & FreeType Android 2D Graphics Essentials Kyungmin Lee Software Platform Lab., LG Electronics [email protected] The 10th Kandroid Conference Goal S/W 플랫폼에 있어 GUI(Graphical User Interface) 시스템은 해당 플랫폼의 성능을 결정짓는 매우 중요한 요소이다. Android 역시 새로운 버전을 발표할 때마다 GUI 시스템의 성능을 꾸준히 개선하여 최근에 릴리즈된 Jelly Bean에 와서는 iOS에 필적할만한 성능을 보여주고 있다. 이번 세션에서는 이벤트 처리 기술과 더불어 GUI 시스템의 한 축을 이루고 있는 2D Graphics 기술을 Android에서 어떻게 활용하고 발전시켜 왔는지에 대해 살펴본다. 1. Skia: 2D Graphics Library Skia in Android Skia API Overview Skia Rendering Pipeline Skia Backends: Raster, OpenGL, PDF, ... 2. FreeType: Font Engine FreeType in Android FreeType API Overview Font Rasterization: Scan-conversion, Hinting, … 3. Android 2D Graphics Essentials Evolution of Drawing Models: GPUI (UI on the GPU), Display List, Display List Properties, View Layers, … Android 2D Graphics Architecture (From Conference Program Overview) The 9th Kandroid Conference Skia is Greek for “shadow” http://code.google.com/p/skia/ Skia is a complete 2D graphic library for drawing Text, Geometries, and Images. • 3x3 matrices w/ perspective • antialiasing, transparency, filters • shaders, xfermodes, maskfilters, patheffects Mike Reed • subpixel text Device backends for Skia currently include: • Raster • OpenGL • PDF • XPS • Picture (for recording and then playing back into another Canvas) (From Project‟s Home) The Skia Graphics Engine is a compact open source graphics library written in C++. It was originally developed by Skia Inc., which was subsequently acquired by Google in 2005, who then released the software as open source licensed under the New BSD License free software license. Now known as skia, it is currently used in Mozilla Firefox, Google Chrome, Chrome OS, Chromium OS, and Android; and the Skia library is present on the BlackBerry PlayBook though the extent of its usage is unclear. Skia's drawing has back-ends for a standard CPU-based software rasterizer, PDF, and OpenGL (From Wikipedia) The 10th Kandroid Conference Skia in Android Skia (svn) Skia in Android 2006-09 r1 2006-09 r2 2006-11 r3 2008-10 2008-11 r4 … 2009-03 r100 2011-03 r1000 2011-07 r2000 … 2012-01 r3000 ??? 2012-05 r4000 2012-08 r5000 ~700 2012-10 r6022 total commit # Added Removed The 10th Kandroid Conference Skia API Overview A Canvas encapsulates all of the state about drawing into a device (bitmap). This includes a reference to the device itself, and a stack of matrix/clip values. For any given draw call (e.g. drawRect), the geometry of the object being drawn is transformed by the concatenation of all the matrices in the stack. The transformed geometry is clipped by the intersection of all of the clips in the stack. While the Canvas holds the state of the drawing device, the state (style) of the object being drawn is held by the Paint, which is provided as a parameter to each of the draw() methods. The Paint holds attributes such as color, typeface, textSize, strokeWidth, shader (e.g. gradients, patterns), etc. Drawing basic primitives include rectangles, rounded rectangles, ovals, circles, arcs, paths, lines, text, bitmaps and sprites. Paths allow for the creation of more advanced shapes. Each path can be made up of multiple contours (or continuous sections), each consisting of linear, quadratic, and cubic segments Drawing Primitives Canvas Bitmap Paint The 10th Kandroid Conference Skia API Overview SkRect rect; rect.set(0, 0, 150, 120); canvas->drawRect (rect, shapePaint); canvas->drawRoundRect (rect, 15, 15, shapePaint); canvas->drawOval(rect, shapePaint); canvas->drawCircle(60, 60, 60, shapePaint); // Arc without a wedge canvas->drawArc (rect, 0, 255, false, shapePaint); // Arc with a wedge from the center canvas->drawArc (rect, 0, 255, true, shapePaint); canvas->drawLine(0, 0, 150, 120, shapePaint); const char str[] = "Hello World!"; canvas->drawText(str, strlen(str), 75, 145, textPaint); // Load a bitmap from an image and draw it only if the load succeeds SkBitmap bitmap; if (SkImageDecoder::DecodeFile("app/native/icon.png", bitmap)) { canvas->drawBitmap(*bitmap, 0, 0, NULL); } SkPath path; path.moveTo(50, 50); // Specify endpoint using absolute coordinates path.lineTo(100, 100); // Specify endpoint using a relative offset from the last point path.rLineTo(50, 50); // Specify endpoint using absolute coordinates path.quadTo(120, 125, 150, 150); // Specify endpoint using a relative offset from the last point path.rQuadTo(20, 25, 50, 50); // Specify endpoint using absolute coordinates path.cubicTo(175, 175, 140, 120, 200, 200); // Specify endpoint using a relative offset from the last point path.TherQuadTo 10th(25 Kandroid, 25, -10, Conference -30, 50, 50 ); canvas->drawPath(path, shapePaint); Skia Rendering Pipeline Rasterization Shading SkCanvas draw*(…, SkPaint) Apply Scan Shaders Conversion Initial Path Initial Initial Mask Rasterizer SRC Image Apply Apply Apply Path Effects Mask Filters Color Filters Apply Stroke Styles Mask SRC Image Path Generation Transfer Path Intermediate Apply Blending Image XferMode Modified DST Image DST Image http://www.xenomachina.com/2011/05/androids-2d-canvas-rendering-pipeline.html The 10th Kandroid Conference Skia Backends To render with software Skia 1) Create a native window and then 2) Wrap a pointer to its buffer as an SkBitmap 3) Initialize an SkCanvas with the bitmap SkCanvas SkDevice SkBitmap To render with hardware-accelerated Skia 1) Create a GLES2 window or framebuffer and 2) Create the appropriate GrContext, SkGpuDevice, and SkGpuCanvas SkGpuCanvas SkGpuDevice GrContext The 10th Kandroid Conference FreeType?A Free, High-Quality, and Portable Font Engine http://code.google.com/p/skia/ FreeType is a software library written in C that implements a font rasterization engine. It is used to render text on to bitmaps and provides support for other font- related operations. (From Wikipedia) FreeType 2 is a software font engine that is designed to be small, efficient, highly customizable, and portable while capable of producing high-quality output (glyph images). It can be used in graphics libraries, display servers, font conversion tools, text image generation tools, and many other products as well. Note that FreeType 2 is a font service and doesn't provide APIs to perform higher- level features like text layout or graphics processing (e.g., colored text rendering, „hollowing‟, etc.). However, it greatly simplifies these tasks by providing a simple, easy to use, and uniform interface to access the content of font files. By default, FreeType 2 supports the following font formats: TrueType (and collections), Type 1, CID-keyed Type 1, CFF, OpenType (both , TrueType and CFF variants), SFNT-based bitmap, X11 PCF, Windows FNT, BDF (including anti-aliased ones), PFR, Type 42 (limited support) (From Project‟s Home) David Turner Robert Wilhelm Werner Lemberg The 10th Kandroid Conference FreeType in Android FreeType2 FreeType2 in Android 2000-11 2.0.0 … … 2007-07 2.3.5 2008-06 2.3.6 ??? 2009-03 2.3.9 2008-10 2009-06 2010-02 2.3.12 2010-03 2010-08 2.4.2 2010-09 2010-11 2.4.4 2011-01 2010-07 2.4.6 2011-08 Added Removed 2010-10 2.4.7 2011-11 2010-11 2.4.8 2011-12 2012-03 2.4.9 2012-03 2012-06 2.4.10 commit # ~1100 ~50 since 2007-07 The 10th Kandroid Conference FreeType API Glyph Outline (Lines + Curves) Quadratic Bé zier Curve Cubic Bé zier Curve The 10th Kandroid Conference FreeType API FT_Library library; FT_Face face; 1 Initialize the library FT_GlyphSlot slot; FT_Error error; char* filename, text; int pen_x, pen_y, n, num_chars; 2 Load a font face ... /* initilization code */ error = FT_Init_FreeType( &library ); if ( error ) ... /* error handling code */ Set the character size error = FT_New_Face( library, filename, 0, &face ); 3 if ( error ) ... /* error handling code */ (e.g., 50pt at 100dpi) error = FT_Set_Char_Size( face, 50 * 64, 0, 100, 0 ); if ( error ) ... /* error handling code */ Load a glyph image slot = face->glyph; 4 for ( n = 0; n < num_chars; n++ ) { into the slot error = FT_Load_Char( face, text[n], FT_LOAD_DEFAULT ); if ( error ) continue; /* ignore errors */ error = FT_Render_Glyph( face, text[n], FT_RENDER_MODE_NORMAL ); Convert the glyph‟s if ( error ) continue; /* ignore errors */ 5 draw_bitmap( &slot->bitmap, pen_x + slot->bitmap_left, outline to a bitmap pen_y - slot->bitmap_top ); pen.x += slot->advance.x >> 6; Draw the bitmap to } 6 a target surface show_image(); FT_Done_Face ( face ); FT_Done_FreeType( library ); 7 Release resources The 10th Kandroid Conference Font Rasterization: Hinting Font hinting (also known as instructing) is the use of mathematical instructions to adjust the display of an outline font so that it lines up with a rasterized grid. At low screen resolutions, hinting is critical for producing a clear, legible text. It can be accompanied by antialiasing and (on liquid crystal displays) subpixel rendering for further clarity. Hints are usually created in a font editor during the typeface design process and embedded in the font. A font can be hinted either automatically (through processed algorithms based on the character outlines) or set manually. Most font editors are able to do automatic hinting, and this approach is suitable for many fonts. However, commercial fonts of the highest quality are often manually hinted to provide the sharpest appearance on computer displays. Verdana is one example of a font that contains a large amount of hinting data, much of which was accomplished manually by type engineer Tom Rickner. (From Wikipedia) The 10th Kandroid Conference How Views are Drawn in Android pre-3.0? CPU Rasterization + GPU Composition
Recommended publications
  • 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]
  • 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]
  • 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]
  • 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]
  • The Comicsans Pacakge
    The comicsans package∗ Scott Pakin [email protected] December 19, 2013 1 Introduction The comicsans package makes Microsoft's Comic Sans font available to LATEX 2". comicsans supports all of the following: • Roman text, boldface text, SMALL-CAPS TEXT, and—with a little extra effort—italic text • Кирилица (римский шрифт, жирный шрифт, каллиграфический шрифт) • Mathematics using Comic Sans wherever possible: ′ log 2" 1 k y (x) 3 10 3 + k=x pk1 Comic Sans is a TrueType (TTF) font. As such, it works particularly well with pdfLATEX, which natively supports TrueType fonts. Some TEX distribu- tions also support dynamic conversion of TTF to PK (a bitmapped font format long used by TEX) so TEX backends other than pdfTEX can (indirectly) utilize TrueType fonts, as well. 2 Installation The following is a brief summary of the comicsans installation procedure: 1. Acquire and install the Comic Sans TrueType (.ttf) files. 2. [Optional] Generate the italic and/or Cyrillic variants of Comic Sans 3. Install the comicsans font files and refresh the TEX filename database. ∗This document corresponds to comicsans v1.0g, dated 2013/12/19. 1 4. Point the TEX backends to the comicsans files. Details are presented in Sections 2.1–2.4. 2.1 Acquire and install the TrueType files comicsans requires the Comic Sans and Comic Sans Bold TrueType files (comic.ttf and comicbd.ttf). You may already have these installed. (On Windows, look in C:\WINDOWS\Fonts for Comic Sans MS (True- Type) and Comic Sans MS Bold (TrueType).) If not, see if a package called msttcorefonts is available for your operating system or operating-system distribution.
    [Show full text]
  • Variable Fonts in Chrome Webengines Hackfest, Igalia, a Coruña
    Variable Fonts in Chrome Webengines Hackfest, Igalia, A Coruña Behdad Esfahbod [email protected] Dominik Röttsches [email protected] Demos ● Responsive Web Typography ● Font Playground ● Underware’s HOI Variable Fonts in CSS Level 4 Fonts font-weight, font-stretch, font-style before font-weight, font-stretch, font-style variable Ranges in @font-face @font-face { font-family: Roboto; font-weight: 700; /* or: 400, 600, 900,... */ font-style: normal; /* or: italic, oblique */ font-stretch: condensed; /* or: expanded, ultra-expanded */ } Ranges in @font-face @font-face { font-family: Roboto; font-weight: 400 700; font-style: 10deg 20deg; font-stretch: 50% 200%; } New Font Style Matching Algorithm ● https://drafts.csswg.org/css-fonts-4/#font-style-matching ● Previously, for a font request: ○ Match font-stretch, font-style, font-weight by traversing keyword values, find closest keyword ● New definition: Search for numerically nearest value ○ As defined by @font-face and ○ Within the range that the variable font allows font-optical-sizing font-variation-settings ● Similar to font-feature-settings ● Sequence of 4 character axis name plus font-variation-settings: ‘wght’ 700, ‘UPWD’ 200; Variable Fonts in Blink New CSS Font Matching Algorithm ● Implements font-stretch, font-style, font-weight matching based on numbers, not based on keywords ● FontTraits replaced with FontSelectionRequest ○ Now storing three FontSelectionValues (numerical values for stretch, style weight) ● FontSelectionCapabilities are storing what the @font-face definition provides
    [Show full text]
  • Optimal Use of Fonts on Linux
    Optimal Use of Fonts on Linux Avi Alkalay Donovan Rebbechi Hal Burgiss Copyright © 2006 Avi Alkalay, Donovan Rebbechi, Hal Burgiss 2007−04−15 Revision History Revision 2007−04−15 15 Apr 2007 Revised by: avi Included support to SUSE installation for the RPM scriptlets on template spec file, listed SUSE as a BCI−enabled distro. Revision 2007−02−08 08 Feb 2007 Revised by: avi Fixed some typos, updated Luc's page URL, added DejaVu sections, added link to FC6 Freetype RPMs, added link to Debian MS Core fonts, and added reference to the gnome−font−properties command. Revision 2006−07−02 02 Jul 2006 Revised by: avi Included link to Debian FreeType BCI package, improved the glossary with Latin1 descriptions, more clear links on the webcore fonts section, instructions on how to rebuild source RPM packages in the BCI appendix, updated the freetype recompilation appendix to cover new versions of the lib, authorship section reorganized. Revision 2006−04−02 02 Apr 2006 Revised by: avi Included link to FC5 Freetype.bci contribution by Cody DeHaan. Revision 2006−03−25 25 Mar 2006 Revised by: avi Updated link to BCI Freetype RPMs to be more distro version specific. Revision 2005−07−19 19 May 2005 Revised by: avi Renamed Microsoft Fonts to Webcore Fonts, and links updated.Added X.org Subsystems section. Revision 2005−05−25 25 May 2005 Revised by: avi Comment related to web pages in the Microsoft Fonts section Revision 2005−05−10 10 May 2005 Revised by: avi Old section−based glossary converted to real DocBook glossary.Modernized terms and explanations on the glossary.Included concepts as charsets, Unicode and UTF−8 in the glossary.
    [Show full text]
  • Secure Remote Service Execution for Web Media Streaming
    Secure Remote Service Execution for Web Media Streaming vorgelegt von Dipl.-Ing. Alexandra Mikityuk geb. in Leningrad, UdSSR von der Fakultät IV – Elektrotechnik und Informatik der Technischen Universität Berlin zur Erlangung des akademischen Grades Doktor der Ingenieurwissenschaften - Dr.-Ing. - genehmigte Dissertation Promotionsausschuss: Vorsitzender: Prof. Dr. Thomas Magedanz, Technische Universität Berlin Gutachter: Prof. Dr. Jean-Pierre Seifert, Technische Universität Berlin Gutachter: Prof. Dr. Jean-Claude Dufourd, ParisTech Gutachter: Prof. Dr.-Ing. Ina Schieferdecker, Technische Universität Berlin Tag der wissenschaftlichen Aussprache: 29. August 2017 Berlin 2017 D 83 Abstract Through continuous advancements in streaming and Web technologies over the past decade, the Web has become a platform for media delivery. Web standards like HTML5 have been designed accordingly, allowing for the delivery of applications, high-quality streaming video, and hooks for interoperable content protection. Efficient video encoding algorithms such as AVC/HEVC and streaming protocols such as MPEG-DASH have served as additional triggers for this evolution. Users now employ Web browsers as a tool for receiving streaming media and rendering Web applications, and browsers have been embedded into almost every kind of connected device. The drawback of these technical developments and quick rate of user adoption is that modern Web browsers have introduced significant constraints on devices’ capabilities. First, the computational requirements have risen continuously, resulting in a cycle where modern devices can be nearly outdated after a year or two. Second, as the integration of browser technologies is a complicated matter, not every platform provides the same performance. Different Operating Systems (OSs), chipsets and software engines are the main reasons for this difference in performance.
    [Show full text]
  • A Module for Using METAFONT Directly Inside the Freetype Rasterizer 138 Tugboat, Volume 39 (2018), No
    136 TUGboat, Volume 39 (2018), No. 2 FreeType MF Module: Fonts are the graphical representation of text A module for using METAFONT directly in a specific style and size. These fonts are mainly inside the FreeType rasterizer categorized in two types: outline fonts and bitmap fonts. Outline fonts are the most popular fonts for Jaeyoung Choi, Ammar Ul Hassan, producing high-quality output used in digital envi- Geunho Jeong ronments. However, to create a new font style as Abstract an outline font, font designers have to design a new font with consequent extensive cost and time. This METAFONT is a font description language which gen- recreation of font files for each variant of a font can erates bitmap fonts for the use by the T X system, E be especially painful for font designers in the case of printer drivers, and related programs. One advan- CJK fonts, which require designing of thousands in- tage of METAFONT over outline fonts is its capability dividual glyphs one by one. Compared to alphabetic for producing different font styles by changing pa- scripts, CJK scripts have both many more characters rameter values defined in its font specification file. and generally more complex shapes, expressed by Another major advantage of using METAFONT is combinations of radicals [3]. Thus it often takes more that it can produce various font styles like bold, than a year to design a CJK font set. italic, and bold-italic from one source file, unlike A programmable font language, METAFONT, outline fonts, which require development of a sepa- has been developed which does not have the above rate font file for each style in one font family.
    [Show full text]
  • Creating Truetype Fonts Based on METAFONT
    The METATYPE Project: Creating TrueType Fonts Based on METAFONT Serge Vakulenko Cronyx Engineering, Moscow, Russia [email protected] http://www.vak.ru/proj/metatype Abstract The purpose of the METATYPE project is the development of freeware TrueType fonts for the general user community. The METAFONT language was chosen for creating character glyphs. Currently, glyph images are converted to cubic outlines using a bitmap tracing algorithm, and then to conic outlines. Two font families are currently under development as part of the METATYPE project: the TeX font family, based on Computer Modern fonts by Donald E. Knuth, retaining their look and feel. A rich set of typefaces is available, including Roman, Sans Serif, Monowidth and Math faces with Normal, Bold, Italic, Bold Italic, Narrow and Wide variations; and second, the Maestro font family, which is designed as a Times look-alike. It also uses Computer Modern sources, but with numerous modifications. Résumé Le but du projet METATYPE est le développement de fontes TrueType libres pour la commu- nauté générale d’utilisateurs. Le langage de programmation METAFONT est utilisé pour créer les glyphes. Actuellement, les glyphes sont convertis d’abord en contours cubiques, en utilisant un al- gorithme d’auto-traçage de bitmap, et ensuite en contours coniques. Deux familles de fontes sont actuellement en développement, dans le cadre du projet META- TYPE : la famille «TeX font», basée sur les fontes Computer Modern de Donald E. Knuth, et proposant du romain, du sans empattements, du mono-chasse, et les fontes mathématiques, dans les styles : régulier, gras, italique, gras italique, étroitisé et élargi ; la famille «Maestro», qui est un clone du Times.
    [Show full text]
  • Typesetting Bangla Script with Lualatex
    TUGboat, Volume 41 (2020), No. 1 69 Table 1: Example rendering with the various modes Typesetting Bangla script with LuaLATEX Ulrike Fischer, Marcel Krüger base কণ্যা এখন কি করিবে? node কণ্যা এখন িক কিরেব? In [2], Md Qutub Uddin Sajib describes some expe- harf কণ㖯া এখন �ক ক����? riences and insights concerning typesetting Bangla. While we don’t know Bangla, we want to share a font-by-font basis between the base mode (mostly A some additional information about the LuaLTEX used for math fonts), node mode (used for text) and side, especially about how to use the possibilities of the new harf mode (which has a number of sub- the new HarfBuzz library. modes). HarfBuzz is an addition to, not a replace- ment for, the existing font shapers. If the library 1 HarfBuzz in LuaLATEX — the engine choice isn’t used the new engine behaves like luatex. Typesetting a script is more than placing glyphs side Table 1 shows the rendering of an example text by side. Even in the rather simple western scripts in the three modes. In comparing the output one there are already ligatures, kerning and accents to can see — even if one doesn’t understand the script — handle and many scripts have much more complex that base mode doesn’t know much, node mode a A rules. Up to now LuaLTEX wasn’t very good with bit and harf mode a lot about the script. E.g., the such scripts. This wasn’t due to a fundamental third word is U+0995 U+09BF (corresponding to the deficiency, but a lack of manpower: To implement Bengali letters “KA”: ক and “I”: ি ).
    [Show full text]
  • Xamk Opinnäytteen Kirjoitusalusta Versio 14022017
    F Jakhongir Fayzullaev Native-like Cross-Platform Mobile Development Multi-OS Engine & Kotlin Native vs Flutter Bachelor’s thesis Information Technology 2018 Author (authors) Degree Time Jakhongir Fayzullaev Bachelor of Engineering May 2018 Thesis title 62 pages Native-like Cross-Platform Mobile Development 0 pages of appendices Multi-OS Engine & Kotlin Native vs Flutter Commissioned by Xamk Supervisor Timo Mynttinen Abstract The goal of this thesis was to study and demonstrate a relatively new way and tools of cross-platform mobile development and to research such technologies as Multi-OS Engine, Kotlin/Native and Flutter. The thesis contains both theory and practice about how Multi-OS Engine, Kotlin/Native and Flutter work. The thesis discussed the theory of native development vs cross-platform development as well as other cross-platform development options. As these technologies are relatively new there are not many previous studies about the topic. The thesis aimed to provide illustrative examples to demonstrate how tools could be used, their features and a work example. The thesis concludes with a case study where three sample applications were made using different tools. The main goal of the case was to showcase how these technologies could be used in real world. The case study serves as a demonstration of the possibilities of these three tools. At the end the advantages and disadvantages of both tools were found and the real use case of them. Keywords Android, iOS, Flutter ,Kotlin, Java, Dart, cross-platform, programming, CONTENTS 1 INTRODUCTION .......................................................................................................... 5 2 NATIVE VS CROSS-PLATFORM DEVELOPMENT ..................................................... 7 2.1 Why cross-platform? ..............................................................................................
    [Show full text]