SlideShare a Scribd company logo
1 of 6
Download to read offline
True Type Font Tables
                                  Omer Salih Dawood Omer,
                    College of computer Science and Information Technology,
                          Sudan University of Science and Technology,
                                 Email:Omercomail@gmail.com
                                              June 22, 2011


Abstract                                                      P latf orm        F ontT ype         RequiredF iles
                                                                                TrueType                 1
TTF play major roles in operating system because               Windows     TrueType Collection           1
it represents fonts that contained in the system and                        PostScript Type 1            2
you can add your own font, TTF consist from set                                 OpenType                 1
of tables each table responsible from specific func-                         Windows style TT             1
tion which collectively provide the main functional-          Mac OS X          OpenType                 1
ity of the TTF. This paper aimed to provide general                         PostScript Type 1            2
overview of TTF and how to read the TTF content                              Linux TrueType              1
to be readied by human.                                         Linux       PostScript Type 1            2

                                                                         Table 1: TTF in different OS
1     Introduction.
1.1    True Type Font.                                       ent smart rendering system producing the Apple Ad-
                                                             vanced Typography (AAT) font specification. SILs
The primary font technology used on Microsoft Win-           Graphite smart rendering system works by adding
dows and the Mac OS is based on the TrueType spec-           tables, too. This section is only concerned with the
ification. TrueType fonts are scalable which means            tables which were part of the original TrueType spec-
the glyphs can be displayed at any resolution and            ification and which are still used in OpenType, AAT,
any point size (though the glyphs may not look good          and Graphite to describe glyphs and provide general
in extreme cases). A TrueType font is a binary               font data [1].
file containing a number of tables. There is a di-
rectory of tables at the start of the file. The file           1.1.1   True Type Font tables in different Op-
may contain only one table of each type, and the                     erating System.
type is indicated by a case-sensitive four letter tag.
Each table and the whole font have checksums. The            The table 1 shows information about the various font
TrueType specification was developed by Apple and             types on each platform [2].
adopted by Microsoft. Later Microsoft and Adobe
expanded the specification to support smart render-           1.2     Open Type Fonts.
ing and PostScript glyphs. The new specification,
which added more tables, was called OpenType. Ap-            An OpenType font file contains data, in table format,
ple also added tables to TrueType to support a differ-        that comprises either a TrueType or a PostScript out-


                                                         1
DataT ype           Description                                 3. Unicode support
   BYTE        8-bit unsigned integer
  CHAR           8-bit signed integer                            4. Glyph alternates supported
 USHORT        16-bit unsigned integer                           5. Advanced typography supported
  SHORT         16-bit signed integer
  UINT24       24-bit unsigned integer                           6. Better protection of font data
 ULONG         32-bit unsigned integer
                                                                 7. Font embedding controls
  LONG          32-bit signed integer
  LONG          32-bit signed integer

              Table 2: OTF Data Type
                                                                2      Background.
                                                                2.1      development of True Type Font
line font. Rasterizers use combinations of data from                • Back in the late 1980s, it was clear to most of the
the tables contained in the font to render the True-                  major players in the personal computer world
Type or PostScript glyph outlines. Some of this sup-                  that scalable font technology was going to be
porting data is used no matter which outline format                   an important part of future operating systems.
is used; some of the supporting data is specific to ei-                Adobe was trying to get Apple and Microsoft to
ther TrueType or PostScript.[3] OpenType fonts may                    license its PostScript code for this purpose. Ap-
have the extension .OTF or .TTF, depending on the                     ple and Microsoft agreed a cross-licensing and
kind of outlines in the font and the creator’s desire for             product development deal, the fruits of which
compatibility on systems without native OpenType                      would be available to both parties: Microsoft
support.                                                              would bring a PostScript-style graphics engine to
  • In all cases, fonts with only CFF data (no True-                  the table (TrueImage), while Apple would create
    Type outlines) always have an .OTF extension.                     a font system even better than Adobe’s

  • Fonts containing TrueType outlines may have ei-                 • In mid-1989, when they learned that Apple
    ther .OTF or .TTF, depending on the desire for                    would not be requiring its technology, they an-
    backward compatibility on older systems or with                   nounced a program, Adobe Type Manager, be-
    previous versions of the font. TrueType Collec-                   fore it had even been written,About a year later,
    tion fonts should have a .TTC extension whether                   you could buy ATM to display Adobe Type 1
    or not the fonts have OpenType layout tables                      fonts on the Macintosh, without any help from
    present.[3]                                                       Apple. ATM was sold cheaply, or was bundled
                                                                      with fonts bought from Adobe.
1.2.1   OTF Data Type                                               • Apple had been developing what was to become
                                                                      TrueType from late 1987 At that time there were
table 2 show and describe open type font (OTF) data
                                                                      many competing font scaling technologies, and
types [3]
                                                                      several would have been suitable for the Macin-
                                                                      tosh. Kaasila completed his work on TrueType,
1.2.2   Benefits of Open Type Font [4]                                 though it didn’t yet have that name, in August
There are many benefits from Open Type Font,as                         1989.
Follows :                                                           • Apple released TrueType to the world in March
 1. Support for large character sets                                  1991 - the core engine in much the same form
                                                                      that Kaasila left it back in 1989. This first cus-
 2. Multi-script character sets                                       tomer version was an 80K add-on to System 6.0,


                                                            2
available until recently on the Apple website!         number of TrueType tables[6]. The TTC Header
      The system needed fonts of course, and the first        must be located at the beginning of the TTC file.
      TrueType fonts - Times Roman, Helvetica and            The TTC file must contain a complete Table Direc-
      Courier - were great examples of what could be         tory for each different font design. A TTC file Table
      done with the technology.                              Directory has exactly the same format as a TTF file
                                                             Table Directory. The table offsets in all Table Di-
  • Microsoft introduced TrueType into Windows               rectories within a TTC file are measured from the
    with version 3.1 in early 1992. Working with             beginning of the TTC file. Each TrueType table in
    Monotype, they had created the superb core set           a TTC file is referenced through the Table Directo-
    of fonts - TrueType versions of Times New Ro-            ries of all fonts which use that table. Some of the
    man, Arial and Courier. These fonts showed,              TrueType tables must appear multiple times, once
    just as Apple’s TrueTypes had, that scalable             for each font included in the TTC; while other ta-
    fonts could generate bitmaps virtually as though         bles should be shared by all fonts in the TTC. As
    each size had been designed by hand.                     an example, consider a TTC file which combines two
  • Only in August 1995, with the release of Win-            Japanese fonts (Font1 and Font2). The fonts have
    dows 95, did Microsoft’s TrueType engine be-             different kana designs (Kana1 and Kana2) but use
    come 32-bit, complete and reliable. Indeed,              the same design for kanji. The TTC file contains a
    it now features greyscale rasterization (anti-           single glyf table which includes both designs of kana
    aliasing), enhancing on-screen text substan-             together with the kanji; both fonts Table Directories
    tially. Microsoft have commissioned some superb          point to this glyf table. But each fonts Table Direc-
    new[5]. TrueType fonts that they give out free           tory points to a different cmap table, which identifies
    on their website. The rehabilitation of TrueType         the glyph set to use. Font1s cmap table points to
    is well underway [5].                                    the Kana1 region of the loca and glyf tables for kana
                                                             glyphs, and to the kanji region for the kanji. Font2s
                                                             cmap table points to the Kana2 region of the loca and
2.2     TrueType Collection (TTC)                            glyf tables for kana glyphs, and to the same kanji re-
A TrueType Collection (TTC) is a means of deliv-             gion for the kanji.
ering multiple TrueType fonts in a single file struc-         The tables that should have a unique copy per font
ture. TrueType Collections are most useful when the          are those that are used by the system in identifying
fonts to be delivered together share many glyphs in          the font and its character mapping, including cmap,
common. By allowing multiple fonts to share glyph            name, and OS/2. The tables that should be shared
sets, TTCs can result in a significant saving of file          by all fonts in the TTC are those that define glyph
space. For example, a group of Japanese fonts may            and instruction data or use glyph indices to access
each have their own designs for the kana glyphs, but         data: glyf, loca, hmtx, hdmx, LTSH, cvt , fpgm, prep,
share identical designs for the kanji. With ordinary         EBLC, EBDT, EBSC, maxp, and so on. In practice,
TrueType font files, the only way to include the com-         any tables which have identical data for two or more
mon kanji glyphs is to copy their glyph data into each       fonts may be shared. Creating a TrueType Collec-
font. Since the kanji represent much more data than          tion by combining existing TrueType font files is a
the kana, this results in a great deal of wasteful du-       non-trivial process. It involves paying close atten-
plication of glyph data. TTCs were defined to solve           tion the issue of glyph renumbering in a font and
this problem .                                               the side effects that can result, in the cmap table
                                                             and elsewhere. The fonts to be merged must also
                                                             have compatible TrueType instructionsthat is, their
2.2.1    TTC File Structure
                                                             preprograms, function definitions, and control values
A TrueType Collection file consists of a single TTC           must not conflict[6].
Header table, two or more Table Directories, and a           TrueType Collection files use the filename suffix


                                                         3
N ame          req           Description                         T ype           N ame                Description
 name          [req]       Font Information                     USHORT      numberOfGlyphs          Number of glyphs
  glyf         [req]    Contains glyph outlines                  CHAR       offset[numGlyphs]        Difference between
 cmap          [req]      Contains multiple                                                         graphic index and
                            mapping tables                                                       standard order of glyph
    post        [req]    contain glyph names
    OS/2      [req on         spacing, font                               Table 4: glyph in the font file
             Windows]    weight and font style
    head        [req]         font metrics
                                                               and OpenType fonts with TrueType data. OpenType
                             and checksum
                                                               fonts with TrueType data may also use Version 3.0.
    CFF                  embedded PostScript                   OpenType fonts with CFF data use Version 3.0 only.
                                 glyphs
    kern                   kerning pair data                     • Version 1.0
                                                                   This TrueType-based font file contains exactly
                 Table 3: TTF Tables                               the 258 glyphs in the standard Macintosh True-
                                                                   Type font file
.TTC
                                                                 • Version 2.0
                                                                   This is the version required by TrueType-based
2.2.2       TTC Header Table                                       fonts to be used on Windows. This TrueType-
The purpose of the TTC Header table is to locate the               based font file contains glyphs not in the stan-
different Table Directories within a TTC file. The                   dard Macintosh set or the ordering of the glyphs
TTC Header is located at the beginning of the TTC                  in the TrueType font file is non-standard (again,
file (offset = 0). It consists of an identification tag, a            for the Macintosh). The glyph name array maps
version number, a count of the number of TrueType                  the glyphs in this font to name index. If the
fonts (Table Directories) in the file, and an array of              name index is between 0 and 257, treat the name
offsets to each Table Directory.                                    index as a glyph index in the Macintosh stan-
                                                                   dard order. If the name index is between 258
                                                                   and 32767, then subtract 258 and use that to in-
3       True Type Font tables.                                     dex into the list of Pascal strings at the end of
                                                                   the table. Thus a given font may map some of its
Below is a list of the tables used in TrueType                     glyphs to the standard glyph names, and some
files. Also included are tables added by OpenType,                  to its own names. Index numbers 32768 through
Graphite, and Apple. The table name is case sensi-                 65535 are reserved for future use. If you do not
tive and always consists of four eight-bit characters,             want to associate a PostScript name with a par-
which are spaces if the name below is less than four               ticular glyph, use index number 0 which points
characters. The [req] label is placed on tables that are           the name .notdef.
required in fonts that contain TrueType outlines[7].
                                                                 • Version 2.5 This version of the ’post’ table has
                                                                   been deprecated as of OpenType Specification
3.1        PostScript
                                                                   v1.3. This version provides a space saving ta-
This table contains additional information needed to               ble for TrueType-based fonts which contain a
use TrueType or OpenType fonts on PostScript print-                pure subset of, or a simple reordering of, the
ers. This includes data for the FontInfo dictionary                standard Macintosh glyph set. This version is
entry and the PostScript names of all the glyphs.                  useful for TrueType-based font files that con-
Versions 1.0, 2.0, and 2.5 refer to TrueType fonts                 tain only glyphs in the standard Macintosh glyph


                                                           4
set but which have those glyphs arranged in a
      non-standard order or which are missing some
      glyphs. The table contains one byte for each
      glyph in the font file. The byte is treated as a
      signed offset that maps the glyph index used in
      this font into the standard glyph index. In other
      words, assuming that the font contains the three
      glyphs A, B, and C which are the 37th, 38th, and
      39th glyphs in the standard ordering, the ’post’
      table would contain the bytes +36, +36, +36.
      This format has been deprecated by Apple, as of
      February 2000.

    • Version 3.0
      This version is used by OpenType fonts with
      TrueType or CFF data. The version makes
      it possible to create a special font that is not
      burdened with a large ’post’ table set of glyph
                                                                                                                   .
      names. This version specifies that no PostScript
      name information is provided for the glyphs in            Figure 1: application Components
      this font file. The printing behavior of this ver-
      sion on PostScript printers is unspecified, except
      that it should not result in a fatal or unrecov-
      erable error. Some drivers may print nothing, 4.2 TTF Reader/Analyser
      other drivers may attempt to print using a de-
      fault naming scheme[8].                           The TTF reader reads the TTF File contents and
                                                        shows them to the user and it works as follows:
4      Implementation
                                                               1. Open the specified TTF table.
As shown in Figure 1 the Implementation consist
from three parts :

 1. TTF File                                                   2. Calculate the numbers of table the contained
                                                                  into TTF File .
 2. TTF File Reader/Analyzer.

 3. TTF contents.
                                                               3. Read TTF tables name according to their num-
The entire application developed using web program-               ber
ming language known as PHP which used in this ap-
plication to read and present the TTF content to be
readied by human.
                                                              4.3   Show TTF contents
4.1     TTF File
here we specify the TTF file that we want to read its          here we display the TTF tables name that generated
contents                                                      from the TTF Reader/Analyser


                                                          5
5      Result:                                             [8] 7- http://www.microsoft.com/typography/
                                                               otspec/post.htm




                figure[1]:application Results




6      Conclusions:
TTF File is essential in the system and provide im-
portant functionality to the system ,and you can add
your own TTF file to the system, this paper explain
TTF font and other fonts like open Type Font and
post Script ,and give approach to read the tables of
the TTF File


References
    [1] http://scripts.sil.org/cms/scripts/page.php?
        item id=IWS-Chapter08#3054f18b

    [2] http://www.asy.com/fonts.htm

    [3] http://www.microsoft.com/typography/
        otspec/otff.htm

    [4] www.myanmarnlp.net.mm/doc/.../OpenType

    [5] http://www.truetype-
        typography.com/tthist.htm

    [6] http://www.microsoft.com/typography/tt/ttf
         spec/ttch03.doc

    [7] http://scripts.sil.org/cms/scripts/page.php?item
         id=IWS-AppendixC


                                                       6

More Related Content

Similar to True type font tables

Similar to True type font tables (20)

Lesson 1-3 Fundamentals of Programming.pptx
Lesson 1-3 Fundamentals of Programming.pptxLesson 1-3 Fundamentals of Programming.pptx
Lesson 1-3 Fundamentals of Programming.pptx
 
Typography - Understanding Font
Typography - Understanding FontTypography - Understanding Font
Typography - Understanding Font
 
Language enabling
Language enablingLanguage enabling
Language enabling
 
Elem of design unit 7 module 2 investigation of fonts
Elem of design unit 7 module 2 investigation of fontsElem of design unit 7 module 2 investigation of fonts
Elem of design unit 7 module 2 investigation of fonts
 
Programing paradigm & implementation
Programing paradigm & implementationPrograming paradigm & implementation
Programing paradigm & implementation
 
Comp Ppt
Comp PptComp Ppt
Comp Ppt
 
Xml For Dummies Chapter 6 Adding Character(S) To Xml
Xml For Dummies   Chapter 6 Adding Character(S) To XmlXml For Dummies   Chapter 6 Adding Character(S) To Xml
Xml For Dummies Chapter 6 Adding Character(S) To Xml
 
Understanding Character Encodings
Understanding Character EncodingsUnderstanding Character Encodings
Understanding Character Encodings
 
GDI Font Fuzzing in Windows Kernel For Fun
GDI Font Fuzzing in Windows Kernel For Fun GDI Font Fuzzing in Windows Kernel For Fun
GDI Font Fuzzing in Windows Kernel For Fun
 
Chapter - 1.pptx
Chapter - 1.pptxChapter - 1.pptx
Chapter - 1.pptx
 
Advanced C
Advanced C Advanced C
Advanced C
 
Build Apps
Build AppsBuild Apps
Build Apps
 
Programming windows -_charles_petzold
Programming windows -_charles_petzoldProgramming windows -_charles_petzold
Programming windows -_charles_petzold
 
Fonts
FontsFonts
Fonts
 
language.pptx
language.pptxlanguage.pptx
language.pptx
 
Session-1_Introduction to Python.pptx
Session-1_Introduction to Python.pptxSession-1_Introduction to Python.pptx
Session-1_Introduction to Python.pptx
 
Python unit1
Python unit1Python unit1
Python unit1
 
Ayushi
AyushiAyushi
Ayushi
 
Te xworks manual
Te xworks manualTe xworks manual
Te xworks manual
 
FINAL.ppt
FINAL.pptFINAL.ppt
FINAL.ppt
 

Recently uploaded

Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsPrecisely
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 

Recently uploaded (20)

Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power Systems
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 

True type font tables

  • 1. True Type Font Tables Omer Salih Dawood Omer, College of computer Science and Information Technology, Sudan University of Science and Technology, Email:Omercomail@gmail.com June 22, 2011 Abstract P latf orm F ontT ype RequiredF iles TrueType 1 TTF play major roles in operating system because Windows TrueType Collection 1 it represents fonts that contained in the system and PostScript Type 1 2 you can add your own font, TTF consist from set OpenType 1 of tables each table responsible from specific func- Windows style TT 1 tion which collectively provide the main functional- Mac OS X OpenType 1 ity of the TTF. This paper aimed to provide general PostScript Type 1 2 overview of TTF and how to read the TTF content Linux TrueType 1 to be readied by human. Linux PostScript Type 1 2 Table 1: TTF in different OS 1 Introduction. 1.1 True Type Font. ent smart rendering system producing the Apple Ad- vanced Typography (AAT) font specification. SILs The primary font technology used on Microsoft Win- Graphite smart rendering system works by adding dows and the Mac OS is based on the TrueType spec- tables, too. This section is only concerned with the ification. TrueType fonts are scalable which means tables which were part of the original TrueType spec- the glyphs can be displayed at any resolution and ification and which are still used in OpenType, AAT, any point size (though the glyphs may not look good and Graphite to describe glyphs and provide general in extreme cases). A TrueType font is a binary font data [1]. file containing a number of tables. There is a di- rectory of tables at the start of the file. The file 1.1.1 True Type Font tables in different Op- may contain only one table of each type, and the erating System. type is indicated by a case-sensitive four letter tag. Each table and the whole font have checksums. The The table 1 shows information about the various font TrueType specification was developed by Apple and types on each platform [2]. adopted by Microsoft. Later Microsoft and Adobe expanded the specification to support smart render- 1.2 Open Type Fonts. ing and PostScript glyphs. The new specification, which added more tables, was called OpenType. Ap- An OpenType font file contains data, in table format, ple also added tables to TrueType to support a differ- that comprises either a TrueType or a PostScript out- 1
  • 2. DataT ype Description 3. Unicode support BYTE 8-bit unsigned integer CHAR 8-bit signed integer 4. Glyph alternates supported USHORT 16-bit unsigned integer 5. Advanced typography supported SHORT 16-bit signed integer UINT24 24-bit unsigned integer 6. Better protection of font data ULONG 32-bit unsigned integer 7. Font embedding controls LONG 32-bit signed integer LONG 32-bit signed integer Table 2: OTF Data Type 2 Background. 2.1 development of True Type Font line font. Rasterizers use combinations of data from • Back in the late 1980s, it was clear to most of the the tables contained in the font to render the True- major players in the personal computer world Type or PostScript glyph outlines. Some of this sup- that scalable font technology was going to be porting data is used no matter which outline format an important part of future operating systems. is used; some of the supporting data is specific to ei- Adobe was trying to get Apple and Microsoft to ther TrueType or PostScript.[3] OpenType fonts may license its PostScript code for this purpose. Ap- have the extension .OTF or .TTF, depending on the ple and Microsoft agreed a cross-licensing and kind of outlines in the font and the creator’s desire for product development deal, the fruits of which compatibility on systems without native OpenType would be available to both parties: Microsoft support. would bring a PostScript-style graphics engine to • In all cases, fonts with only CFF data (no True- the table (TrueImage), while Apple would create Type outlines) always have an .OTF extension. a font system even better than Adobe’s • Fonts containing TrueType outlines may have ei- • In mid-1989, when they learned that Apple ther .OTF or .TTF, depending on the desire for would not be requiring its technology, they an- backward compatibility on older systems or with nounced a program, Adobe Type Manager, be- previous versions of the font. TrueType Collec- fore it had even been written,About a year later, tion fonts should have a .TTC extension whether you could buy ATM to display Adobe Type 1 or not the fonts have OpenType layout tables fonts on the Macintosh, without any help from present.[3] Apple. ATM was sold cheaply, or was bundled with fonts bought from Adobe. 1.2.1 OTF Data Type • Apple had been developing what was to become TrueType from late 1987 At that time there were table 2 show and describe open type font (OTF) data many competing font scaling technologies, and types [3] several would have been suitable for the Macin- tosh. Kaasila completed his work on TrueType, 1.2.2 Benefits of Open Type Font [4] though it didn’t yet have that name, in August There are many benefits from Open Type Font,as 1989. Follows : • Apple released TrueType to the world in March 1. Support for large character sets 1991 - the core engine in much the same form that Kaasila left it back in 1989. This first cus- 2. Multi-script character sets tomer version was an 80K add-on to System 6.0, 2
  • 3. available until recently on the Apple website! number of TrueType tables[6]. The TTC Header The system needed fonts of course, and the first must be located at the beginning of the TTC file. TrueType fonts - Times Roman, Helvetica and The TTC file must contain a complete Table Direc- Courier - were great examples of what could be tory for each different font design. A TTC file Table done with the technology. Directory has exactly the same format as a TTF file Table Directory. The table offsets in all Table Di- • Microsoft introduced TrueType into Windows rectories within a TTC file are measured from the with version 3.1 in early 1992. Working with beginning of the TTC file. Each TrueType table in Monotype, they had created the superb core set a TTC file is referenced through the Table Directo- of fonts - TrueType versions of Times New Ro- ries of all fonts which use that table. Some of the man, Arial and Courier. These fonts showed, TrueType tables must appear multiple times, once just as Apple’s TrueTypes had, that scalable for each font included in the TTC; while other ta- fonts could generate bitmaps virtually as though bles should be shared by all fonts in the TTC. As each size had been designed by hand. an example, consider a TTC file which combines two • Only in August 1995, with the release of Win- Japanese fonts (Font1 and Font2). The fonts have dows 95, did Microsoft’s TrueType engine be- different kana designs (Kana1 and Kana2) but use come 32-bit, complete and reliable. Indeed, the same design for kanji. The TTC file contains a it now features greyscale rasterization (anti- single glyf table which includes both designs of kana aliasing), enhancing on-screen text substan- together with the kanji; both fonts Table Directories tially. Microsoft have commissioned some superb point to this glyf table. But each fonts Table Direc- new[5]. TrueType fonts that they give out free tory points to a different cmap table, which identifies on their website. The rehabilitation of TrueType the glyph set to use. Font1s cmap table points to is well underway [5]. the Kana1 region of the loca and glyf tables for kana glyphs, and to the kanji region for the kanji. Font2s cmap table points to the Kana2 region of the loca and 2.2 TrueType Collection (TTC) glyf tables for kana glyphs, and to the same kanji re- A TrueType Collection (TTC) is a means of deliv- gion for the kanji. ering multiple TrueType fonts in a single file struc- The tables that should have a unique copy per font ture. TrueType Collections are most useful when the are those that are used by the system in identifying fonts to be delivered together share many glyphs in the font and its character mapping, including cmap, common. By allowing multiple fonts to share glyph name, and OS/2. The tables that should be shared sets, TTCs can result in a significant saving of file by all fonts in the TTC are those that define glyph space. For example, a group of Japanese fonts may and instruction data or use glyph indices to access each have their own designs for the kana glyphs, but data: glyf, loca, hmtx, hdmx, LTSH, cvt , fpgm, prep, share identical designs for the kanji. With ordinary EBLC, EBDT, EBSC, maxp, and so on. In practice, TrueType font files, the only way to include the com- any tables which have identical data for two or more mon kanji glyphs is to copy their glyph data into each fonts may be shared. Creating a TrueType Collec- font. Since the kanji represent much more data than tion by combining existing TrueType font files is a the kana, this results in a great deal of wasteful du- non-trivial process. It involves paying close atten- plication of glyph data. TTCs were defined to solve tion the issue of glyph renumbering in a font and this problem . the side effects that can result, in the cmap table and elsewhere. The fonts to be merged must also have compatible TrueType instructionsthat is, their 2.2.1 TTC File Structure preprograms, function definitions, and control values A TrueType Collection file consists of a single TTC must not conflict[6]. Header table, two or more Table Directories, and a TrueType Collection files use the filename suffix 3
  • 4. N ame req Description T ype N ame Description name [req] Font Information USHORT numberOfGlyphs Number of glyphs glyf [req] Contains glyph outlines CHAR offset[numGlyphs] Difference between cmap [req] Contains multiple graphic index and mapping tables standard order of glyph post [req] contain glyph names OS/2 [req on spacing, font Table 4: glyph in the font file Windows] weight and font style head [req] font metrics and OpenType fonts with TrueType data. OpenType and checksum fonts with TrueType data may also use Version 3.0. CFF embedded PostScript OpenType fonts with CFF data use Version 3.0 only. glyphs kern kerning pair data • Version 1.0 This TrueType-based font file contains exactly Table 3: TTF Tables the 258 glyphs in the standard Macintosh True- Type font file .TTC • Version 2.0 This is the version required by TrueType-based 2.2.2 TTC Header Table fonts to be used on Windows. This TrueType- The purpose of the TTC Header table is to locate the based font file contains glyphs not in the stan- different Table Directories within a TTC file. The dard Macintosh set or the ordering of the glyphs TTC Header is located at the beginning of the TTC in the TrueType font file is non-standard (again, file (offset = 0). It consists of an identification tag, a for the Macintosh). The glyph name array maps version number, a count of the number of TrueType the glyphs in this font to name index. If the fonts (Table Directories) in the file, and an array of name index is between 0 and 257, treat the name offsets to each Table Directory. index as a glyph index in the Macintosh stan- dard order. If the name index is between 258 and 32767, then subtract 258 and use that to in- 3 True Type Font tables. dex into the list of Pascal strings at the end of the table. Thus a given font may map some of its Below is a list of the tables used in TrueType glyphs to the standard glyph names, and some files. Also included are tables added by OpenType, to its own names. Index numbers 32768 through Graphite, and Apple. The table name is case sensi- 65535 are reserved for future use. If you do not tive and always consists of four eight-bit characters, want to associate a PostScript name with a par- which are spaces if the name below is less than four ticular glyph, use index number 0 which points characters. The [req] label is placed on tables that are the name .notdef. required in fonts that contain TrueType outlines[7]. • Version 2.5 This version of the ’post’ table has been deprecated as of OpenType Specification 3.1 PostScript v1.3. This version provides a space saving ta- This table contains additional information needed to ble for TrueType-based fonts which contain a use TrueType or OpenType fonts on PostScript print- pure subset of, or a simple reordering of, the ers. This includes data for the FontInfo dictionary standard Macintosh glyph set. This version is entry and the PostScript names of all the glyphs. useful for TrueType-based font files that con- Versions 1.0, 2.0, and 2.5 refer to TrueType fonts tain only glyphs in the standard Macintosh glyph 4
  • 5. set but which have those glyphs arranged in a non-standard order or which are missing some glyphs. The table contains one byte for each glyph in the font file. The byte is treated as a signed offset that maps the glyph index used in this font into the standard glyph index. In other words, assuming that the font contains the three glyphs A, B, and C which are the 37th, 38th, and 39th glyphs in the standard ordering, the ’post’ table would contain the bytes +36, +36, +36. This format has been deprecated by Apple, as of February 2000. • Version 3.0 This version is used by OpenType fonts with TrueType or CFF data. The version makes it possible to create a special font that is not burdened with a large ’post’ table set of glyph . names. This version specifies that no PostScript name information is provided for the glyphs in Figure 1: application Components this font file. The printing behavior of this ver- sion on PostScript printers is unspecified, except that it should not result in a fatal or unrecov- erable error. Some drivers may print nothing, 4.2 TTF Reader/Analyser other drivers may attempt to print using a de- fault naming scheme[8]. The TTF reader reads the TTF File contents and shows them to the user and it works as follows: 4 Implementation 1. Open the specified TTF table. As shown in Figure 1 the Implementation consist from three parts : 1. TTF File 2. Calculate the numbers of table the contained into TTF File . 2. TTF File Reader/Analyzer. 3. TTF contents. 3. Read TTF tables name according to their num- The entire application developed using web program- ber ming language known as PHP which used in this ap- plication to read and present the TTF content to be readied by human. 4.3 Show TTF contents 4.1 TTF File here we specify the TTF file that we want to read its here we display the TTF tables name that generated contents from the TTF Reader/Analyser 5
  • 6. 5 Result: [8] 7- http://www.microsoft.com/typography/ otspec/post.htm figure[1]:application Results 6 Conclusions: TTF File is essential in the system and provide im- portant functionality to the system ,and you can add your own TTF file to the system, this paper explain TTF font and other fonts like open Type Font and post Script ,and give approach to read the tables of the TTF File References [1] http://scripts.sil.org/cms/scripts/page.php? item id=IWS-Chapter08#3054f18b [2] http://www.asy.com/fonts.htm [3] http://www.microsoft.com/typography/ otspec/otff.htm [4] www.myanmarnlp.net.mm/doc/.../OpenType [5] http://www.truetype- typography.com/tthist.htm [6] http://www.microsoft.com/typography/tt/ttf spec/ttch03.doc [7] http://scripts.sil.org/cms/scripts/page.php?item id=IWS-AppendixC 6