1b6cee71dSXin LI 2b6cee71dSXin LI#------------------------------------------------------------------------------ 3*43a5ec4eSXin LI# $File: fonts,v 1.46 2021/04/26 15:56:00 christos Exp $ 4b6cee71dSXin LI# fonts: file(1) magic for font data 5b6cee71dSXin LI# 6b6cee71dSXin LI0 search/1 FONT ASCII vfont text 7b6cee71dSXin LI0 short 0436 Berkeley vfont data 8b6cee71dSXin LI0 short 017001 byte-swapped Berkeley vfont data 9b6cee71dSXin LI 10b6cee71dSXin LI# PostScript fonts (must precede "printer" entries), quinlan@yggdrasil.com 11b6cee71dSXin LI0 string %!PS-AdobeFont-1. PostScript Type 1 font text 12b6cee71dSXin LI>20 string >\0 (%s) 13b6cee71dSXin LI6 string %!PS-AdobeFont-1. PostScript Type 1 font program data 14*43a5ec4eSXin LI>26 string >\0 (%s) 15b6cee71dSXin LI0 string %!FontType1 PostScript Type 1 font program data 16b6cee71dSXin LI6 string %!FontType1 PostScript Type 1 font program data 17b6cee71dSXin LI0 string %!PS-Adobe-3.0\ Resource-Font PostScript Type 1 font text 18b6cee71dSXin LI 19a5d223e6SXin LI# Summary: PostScript Type 1 Printer Font Metrics 20a5d223e6SXin LI# URL: https://en.wikipedia.org/wiki/PostScript_fonts 2148c779cdSXin LI# Reference: https://partners.adobe.com/public/developer/en/font/5178.PFM.pdf 22a5d223e6SXin LI# Modified by: Joerg Jenderek 23a5d223e6SXin LI# Note: moved from ./msdos magic 24a5d223e6SXin LI# dfVersion 256=0100h 25a5d223e6SXin LI0 uleshort 0x0100 26a5d223e6SXin LI# GRR: line above is too general as it catches also TrueType font, 27a5d223e6SXin LI# raw G3 data FAX, WhatsApp encrypted and Panorama database 28a5d223e6SXin LI# dfType 129=0081h 29a5d223e6SXin LI>66 uleshort 0x0081 30a5d223e6SXin LI# dfVertRes 300=012Ch not needed as additional test 31a5d223e6SXin LI#>>70 uleshort 0x012c 32a5d223e6SXin LI# dfHorizRes 300=012Ch 33a5d223e6SXin LI#>>>72 uleshort 0x012c 34a5d223e6SXin LI# dfDriverInfo points to postscript information section 35a5d223e6SXin LI>>(101.l) string/c Postscript Printer Font Metrics 36a5d223e6SXin LI# above labeled "PFM data" by ./msdos (version 5.28) or "Adobe Printer Font Metrics" by TrID 37a5d223e6SXin LI!:mime application/x-font-pfm 38a5d223e6SXin LI# AppleShare Print Server 39a5d223e6SXin LI#!:apple ASPS???? 40a5d223e6SXin LI!:ext pfm 41a5d223e6SXin LI# dfCopyright 60 byte null padded Copyright string. uncomment it to get old looking 42a5d223e6SXin LI#>>>6 string >\060 - %-.60s 43a5d223e6SXin LI# dfDriverInfo 44a5d223e6SXin LI>>>139 ulelong >0 45a5d223e6SXin LI# often abbreviated and same as filename 46a5d223e6SXin LI>>>>(139.l) string x %s 47a5d223e6SXin LI# dfSize 48a5d223e6SXin LI>>>2 ulelong x \b, %d bytes 49a5d223e6SXin LI# dfFace 210=D2h 9Eh 50a5d223e6SXin LI>>>105 ulelong >0 51a5d223e6SXin LI# Windows font name 52a5d223e6SXin LI>>>>(105.l) string x \b, %s 53a5d223e6SXin LI# dfItalic 54a5d223e6SXin LI>>>80 ubyte 1 italic 55a5d223e6SXin LI# dfUnderline 56a5d223e6SXin LI>>>81 ubyte 1 underline 57a5d223e6SXin LI# dfStrikeOut 58a5d223e6SXin LI>>>82 ubyte 1 strikeout 59a5d223e6SXin LI# dfWeight 400=0x0190 300=0x012c 500=0x01f4 600=0x0258 700=0x02bc 60a5d223e6SXin LI>>>83 uleshort >699 bold 61a5d223e6SXin LI# dfPitchAndFamily 16 17 48 49 64 65 62a5d223e6SXin LI>>>90 ubyte 16 serif 63a5d223e6SXin LI>>>90 ubyte 17 serif proportional 64a5d223e6SXin LI#>>>90 ubyte 48 other 65a5d223e6SXin LI>>>90 ubyte 49 proportional 66a5d223e6SXin LI>>>90 ubyte 64 script 67a5d223e6SXin LI>>>90 ubyte 65 script proportional 68a5d223e6SXin LI 69b6cee71dSXin LI# X11 font files in SNF (Server Natural Format) format 70b6cee71dSXin LI# updated by Joerg Jenderek at Feb 2013 71b6cee71dSXin LI# http://computer-programming-forum.com/51-perl/8f22fb96d2e34bab.htm 72b6cee71dSXin LI0 belong 00000004 X11 SNF font data, MSB first 73b6cee71dSXin LI#>104 belong 00000004 X11 SNF font data, MSB first 74b6cee71dSXin LI!:mime application/x-font-sfn 75b6cee71dSXin LI# GRR: line below too general as it catches also Xbase index file t3-CHAR.NDX 76b6cee71dSXin LI0 lelong 00000004 77b6cee71dSXin LI>104 lelong 00000004 X11 SNF font data, LSB first 78b6cee71dSXin LI!:mime application/x-font-sfn 79b6cee71dSXin LI 80b6cee71dSXin LI# X11 Bitmap Distribution Format, from Daniel Quinlan (quinlan@yggdrasil.com) 81b6cee71dSXin LI0 search/1 STARTFONT\ X11 BDF font text 82b6cee71dSXin LI 833e41d09dSXin LI# From: Joerg Jenderek 8448c779cdSXin LI# URL: https://grub.gibibit.com/New_font_format 853e41d09dSXin LI# Reference: util/grub-mkfont.c 863e41d09dSXin LI# include/grub/fontformat.h 873e41d09dSXin LI# FONT_FORMAT_SECTION_NAMES_FILE 883e41d09dSXin LI0 string FILE 893e41d09dSXin LI# FONT_FORMAT_PFF2_MAGIC 903e41d09dSXin LI>8 string PFF2 913e41d09dSXin LI# leng 4 only at the moment 923e41d09dSXin LI>>4 ubelong 4 933e41d09dSXin LI# FONT_FORMAT_SECTION_NAMES_FONT_NAME 943e41d09dSXin LI>>>12 string NAME GRUB2 font 953e41d09dSXin LI!:mime application/x-font-pf2 963e41d09dSXin LI!:ext pf2 973e41d09dSXin LI# length of font_name 983e41d09dSXin LI>>>>16 ubelong >0 993e41d09dSXin LI# font_name 1003e41d09dSXin LI>>>>>20 string >\0 "%-s" 1013e41d09dSXin LI 102b6cee71dSXin LI# X11 fonts, from Daniel Quinlan (quinlan@yggdrasil.com) 103b6cee71dSXin LI# PCF must come before SGI additions ("MIPSEL MIPS-II COFF" collides) 10440427ccaSGordon Tetlow0 string \001fcp X11 Portable Compiled Font data, 10540427ccaSGordon Tetlow>12 lelong ^0x08 bit: LSB, 10640427ccaSGordon Tetlow>12 lelong &0x08 bit: MSB, 10740427ccaSGordon Tetlow>12 lelong ^0x04 byte: LSB first 10840427ccaSGordon Tetlow>12 lelong &0x04 byte: MSB first 109b6cee71dSXin LI0 string D1.0\015 X11 Speedo font data 110b6cee71dSXin LI 111b6cee71dSXin LI#------------------------------------------------------------------------------ 112b6cee71dSXin LI# FIGlet fonts and controlfiles 113b6cee71dSXin LI# From figmagic supplied with Figlet version 2.2 114b6cee71dSXin LI# "David E. O'Brien" <obrien@FreeBSD.ORG> 115b6cee71dSXin LI0 string flf FIGlet font 116b6cee71dSXin LI>3 string >2a version %-2.2s 117b6cee71dSXin LI0 string flc FIGlet controlfile 118b6cee71dSXin LI>3 string >2a version %-2.2s 119b6cee71dSXin LI 120b6cee71dSXin LI# libGrx graphics lib fonts, from Albert Cahalan (acahalan@cs.uml.edu) 121b6cee71dSXin LI# Used with djgpp (DOS Gnu C++), sometimes Linux or Turbo C++ 122b6cee71dSXin LI0 belong 0x14025919 libGrx font data, 123b6cee71dSXin LI>8 leshort x %dx 124b6cee71dSXin LI>10 leshort x \b%d 125b6cee71dSXin LI>40 string x %s 126b6cee71dSXin LI# Misc. DOS VGA fonts, from Albert Cahalan (acahalan@cs.uml.edu) 127*43a5ec4eSXin LI# Update: Joerg Jenderek 128*43a5ec4eSXin LI# URL: http://fileformats.archiveteam.org/wiki/CPI 129*43a5ec4eSXin LI# Reference: http://www.delorie.com/djgpp/doc/rbinter/it/58/17.html 130b6cee71dSXin LI0 belong 0xff464f4e DOS code page font data collection 131*43a5ec4eSXin LI!:mime font/x-dos-cpi 132*43a5ec4eSXin LI!:ext cpi 133*43a5ec4eSXin LI0 string \x7fDRFONT DR-DOS code page font data collection 134*43a5ec4eSXin LI!:mime font/x-drdos-cpi 135*43a5ec4eSXin LI!:ext cpi 136b6cee71dSXin LI7 belong 0x00454741 DOS code page font data 137b6cee71dSXin LI7 belong 0x00564944 DOS code page font data (from Linux?) 138b6cee71dSXin LI4098 string DOSFONT DOSFONT2 encrypted font data 139b6cee71dSXin LI 14048c779cdSXin LI# From: Joerg Jenderek 14148c779cdSXin LI# URL: http://fileformats.archiveteam.org/wiki/GEM_bitmap_font 14248c779cdSXin LI# Reference: http://cd.textfiles.com/ataricompendium/BOOK/HTML/APPENDC.HTM#cnt 14348c779cdSXin LI# 14448c779cdSXin LI# usual case with lightening mask and skewing mask 5555h~UU 145d38c30c0SXin LI#62 ulelong 0x55555555 146d38c30c0SXin LI# skip cl8m8ocofedso.testfile by looking for face size lower/equal 72 147d38c30c0SXin LI#>2 uleshort <73 148d38c30c0SXin LI#>>0 use gdos-font 14948c779cdSXin LI# BOX18.GFT COWBOY30.GFT ROYALK30.GFT 150d38c30c0SXin LI#62 ulelong 0 15148c779cdSXin LI# skip ISO 9660 CD-ROM ./filesystem by looking for low positive face size 152d38c30c0SXin LI#>2 uleshort >2 153d38c30c0SXin LI# skip DOS 2.0 backup id file ./msdos by looking for face size lower/equal 72 154d38c30c0SXin LI#>>2 uleshort <73 155d38c30c0SXin LI# skip MS oem.hlp, some Windows ICO ./msdos by looking for valid long name like WYE 156d38c30c0SXin LI#>>>4 ulelong >0x001F1f1F 157d38c30c0SXin LI# skip Microsoft WinWord 2.0 ./msdos by looking for positive offset to font data 158d38c30c0SXin LI#>>>>76 ulelong >83 159d38c30c0SXin LI#>>>>>0 use gdos-font 16048c779cdSXin LI0 name gdos-font 16148c779cdSXin LI>0 uleshort x GEM GDOS font 16248c779cdSXin LI!:mime application/x-font-gdos 16348c779cdSXin LI# also .eps found like AA070GEP.EPS AI360GEP.EPS 16448c779cdSXin LI!:ext fnt/gtf 165d38c30c0SXin LI# font name like Big&Tall, Celtic #s, Courier, University Bold, WYE 16648c779cdSXin LI>4 string x %.32s 167d38c30c0SXin LI# face size in points 3-72 SLSS03CG.FNT H1CELT72.FNT 16848c779cdSXin LI>2 uleshort x %u 16948c779cdSXin LI# face ID (must be unique) 170*43a5ec4eSXin LI>0 uleshort x \b, ID %#4.4x 171d38c30c0SXin LI# lowest character index in face (4 but usually 32 for disk-loaded fonts) 172d38c30c0SXin LI#>36 uleshort !32 \b, unusual character index %u 173d38c30c0SXin LI# width of the widest character like 0 8 10 12 16 24 32 17448c779cdSXin LI#>50 uleshort x \b, %u char width 175d38c30c0SXin LI# width of the widest character cell like 8 11 12 14 15 16 33 67 17648c779cdSXin LI#>52 uleshort x \b, %u cell width 177d38c30c0SXin LI# thickening size in pixel like 0 1 2 3 4 5 6 7 8 17848c779cdSXin LI#>58 uleshort x \b, %u thick 17948c779cdSXin LI# lightening mask to eliminate pixels, usually 5555h 180*43a5ec4eSXin LI>62 uleshort !0x5555 \b, lightening mask %#x 18148c779cdSXin LI# skewing mask to determine when to perform additional rotation when skewing, usually 5555h 182*43a5ec4eSXin LI>64 uleshort !0x5555 \b, skewing mask %#x 183d38c30c0SXin LI# offset to optional horizontal offset table 0 58h~88 5eh 252h 184*43a5ec4eSXin LI#>68 ulelong x \b, %#x horizontal table offset 185d38c30c0SXin LI# offset of character offset table 54h for many *.GFT 55h 58h 5Eh 120h 1D4h 202h 220h 186*43a5ec4eSXin LI#>72 ulelong x \b, %#x coffset 187d38c30c0SXin LI# offset to font data like 116h 118h 158 20Ah 20Eh 188*43a5ec4eSXin LI>76 ulelong x \b, %#x foffset 189d38c30c0SXin LI# form width in bytes like 58 67 156 190 227 317 345 19048c779cdSXin LI#>80 uleshort x \b, %u fwidth 191d38c30c0SXin LI# form height in bytes like 4 8 11 17 26 56 70 90 120 146 150 192d38c30c0SXin LI#>82 uleshort x \b, %u fheight 193d38c30c0SXin LI# pointer to the next font like 0 10000h 20000h 30000h 40000h 60000h 80000h E0000h D0000h 194*43a5ec4eSXin LI#>84 ulelong x \b, %#x noffset 19548c779cdSXin LI 196b6cee71dSXin LI# downloadable fonts for browser (prints type) anthon@mnt.org 1973e41d09dSXin LI# https://tools.ietf.org/html/rfc3073 1983e41d09dSXin LI0 string PFR1 Portable Font Resource font data (new) 199b6cee71dSXin LI>102 string >0 \b: %s 2003e41d09dSXin LI0 string PFR0 Portable Font Resource font data (old) 2013e41d09dSXin LI>4 beshort >0 version %d 202b6cee71dSXin LI 203b6cee71dSXin LI# True Type fonts 20440427ccaSGordon Tetlow# Modified by: Joerg Jenderek 20540427ccaSGordon Tetlow# URL: https://en.wikipedia.org/wiki/TrueType 20640427ccaSGordon Tetlow# Reference: https://developer.apple.com/fonts/TrueType-Reference-Manual/ 20740427ccaSGordon Tetlow# 20840427ccaSGordon Tetlow# sfnt version "typ1" used by some Apple, but no example found 20940427ccaSGordon Tetlow0 string typ1 21040427ccaSGordon Tetlow>0 use sfnt-font 21140427ccaSGordon Tetlow>0 use sfnt-names 21240427ccaSGordon Tetlow# sfnt version "true" used by some Apple 21340427ccaSGordon Tetlow0 string true 21440427ccaSGordon Tetlow>0 use sfnt-font 21540427ccaSGordon Tetlow>0 use sfnt-names 21640427ccaSGordon Tetlow# GRR: below test is too general 21740427ccaSGordon Tetlow# sfnt version often 0x00010000 21840427ccaSGordon Tetlow0 string \000\001\000\000 21940427ccaSGordon Tetlow>0 use sfnt-font 22040427ccaSGordon Tetlow>0 use sfnt-names 22140427ccaSGordon Tetlow# validate and display sfnt font data like number of tables 22240427ccaSGordon Tetlow0 name sfnt-font 22340427ccaSGordon Tetlow# file 5.30 version assumes 00FFh as maximal number of tables 22440427ccaSGordon Tetlow#>4 ubeshort <0x0100 22540427ccaSGordon Tetlow# maximal 27 tables found like in Skia.ttf 22640427ccaSGordon Tetlow# 46 different table names mentioned on Apple specification 22740427ccaSGordon Tetlow# skip 1st sequence of DOS 2 backup with path separator (\~92 or /~47) misinterpreted as table number 22840427ccaSGordon Tetlow>4 ubeshort <47 22940427ccaSGordon Tetlow# skip bad examples with garbage table names like in a5.show HYPERC MAC 23040427ccaSGordon Tetlow# tag names consist of up to four characters padded with spaces at end like 23140427ccaSGordon Tetlow# BASE DSIG OS/2 Zapf acnt glyf cvt vmtx xref ... 23240427ccaSGordon Tetlow>>12 regex/4l \^[A-Za-z][A-Za-z][A-Za-z/][A-Za-z2\ ] 233*43a5ec4eSXin LI#>>>0 ubelong x \b, sfnt version %#x 23440427ccaSGordon Tetlow>>>0 ubelong !0x4f54544f TrueType 23548c779cdSXin LI!:mime font/sfnt 23640427ccaSGordon Tetlow!:apple ????tfil 23740427ccaSGordon Tetlow# .ttf for TrueType font 23840427ccaSGordon Tetlow# EUDC.tte created by privat character editor %WINDIR%\system32\eudcedit.exe 23940427ccaSGordon Tetlow!:ext ttf/tte 24040427ccaSGordon Tetlow# sfnt version 4F54544Fh~OTTO 24140427ccaSGordon Tetlow>>>0 ubelong =0x4f54544f OpenType 24248c779cdSXin LI!:mime font/otf 24340427ccaSGordon Tetlow!:apple ????OTTO 24440427ccaSGordon Tetlow!:ext otf 24540427ccaSGordon Tetlow>>>0 ubelong x Font data 24640427ccaSGordon Tetlow# DSIG=44454947h table name implies a digitally signed font 24740427ccaSGordon Tetlow# search range = number of tables * 16 =< maximal number of tables * 16 = 27 * 16 = 432 24840427ccaSGordon Tetlow>>>12 search/432 DSIG \b, digitally signed 24940427ccaSGordon Tetlow>>>4 ubeshort x \b, %d tables 25040427ccaSGordon Tetlow# minimal 9 tables found like in NISC18030.ttf 25140427ccaSGordon Tetlow#>>>4 ubeshort <10 TMIN 25240427ccaSGordon Tetlow#>>>4 ubeshort >24 TBIG 25340427ccaSGordon Tetlow# table directory entries 25440427ccaSGordon Tetlow>>>12 string x \b, 1st "%4.4s" 25540427ccaSGordon Tetlow 25640427ccaSGordon Tetlow# search and display 1st name in sfnt font which is often copyright text 25740427ccaSGordon Tetlow# does not work inside font collections 25840427ccaSGordon Tetlow0 name sfnt-names 25940427ccaSGordon Tetlow# search for naming table 26040427ccaSGordon Tetlow>12 search/432/s name 26140427ccaSGordon Tetlow# biggest offset 0x0100bd28 like Windows10 Fonts\simsunb.ttf 26240427ccaSGordon Tetlow#>>>>&8 ubelong >0x0100bd27 BIGGEST OFFSET 26340427ccaSGordon Tetlow>>&8 ubelong >0x00100000 26440427ccaSGordon Tetlow# offset of name table 265*43a5ec4eSXin LI>>>&-4 ubelong x \b, name offset %#x 26640427ccaSGordon Tetlow# GRR: pointer to name table only works if offset ~< FILE_BYTES_MAX = 100000h defined in src\file.h 26740427ccaSGordon Tetlow>>&8 ubelong <0x00100000 26840427ccaSGordon Tetlow>>>&-16 ubelong x 26940427ccaSGordon Tetlow# name table 27040427ccaSGordon Tetlow>>>>(&8.L) ubequad x 27140427ccaSGordon Tetlow# invalid format selector 27240427ccaSGordon Tetlow#>>>>>&-8 ubeshort !0 \b, invalid selector %x 27340427ccaSGordon Tetlow# minimal 3 name records found like in c:\Program Files (x86)\Tesseract-OCR\tessdata\pdf.ttf 27440427ccaSGordon Tetlow# maximal 1227 name records found like in Apple Chancery.ttf 27540427ccaSGordon Tetlow#>>>>>&-6 ubeshort <0x4 mincount 27640427ccaSGordon Tetlow#>>>>>&-6 ubeshort >130 maxcount 27740427ccaSGordon Tetlow>>>>>&-6 ubeshort x \b, %d names 27840427ccaSGordon Tetlow# offset to start of string storage from start of table 27940427ccaSGordon Tetlow#>>>>>&-4 ubeshort x \b, record offset %d 28040427ccaSGordon Tetlow# 1st name record 28140427ccaSGordon Tetlow# string offset from start of storage area 28240427ccaSGordon Tetlow#>>>>>&8 ubeshort x \b, string offset %d 28340427ccaSGordon Tetlow# string length 28440427ccaSGordon Tetlow#>>>>>&6 ubeshort x \b, string length %d 28540427ccaSGordon Tetlow# minimal name string 7 like in c:\Program Files (x86)\Kodi\addons\webinterface.default\lib\video-js\font\VideoJS.ttf 28640427ccaSGordon Tetlow# also found 0 like in SWZCONLN.TTF 28740427ccaSGordon Tetlow#>>>>>&6 ubeshort <8 MIN STRING 28840427ccaSGordon Tetlow# maximal name string 806 like in c:\Windows\Fonts\palabi.ttf 28940427ccaSGordon Tetlow#>>>>>&6 ubeshort >805 MAX STRING 29040427ccaSGordon Tetlow# platform identifier: 0~Apple Unicode, 1~Macintosh, 3~Microsoft 29140427ccaSGordon Tetlow#>>>>>&-2 ubeshort >3 BAD PLATFORM 29240427ccaSGordon Tetlow>>>>>&-2 ubeshort 0 \b, Unicode 29340427ccaSGordon Tetlow>>>>>&-2 ubeshort 1 \b, Macintosh 29440427ccaSGordon Tetlow>>>>>&-2 ubeshort 3 \b, Microsoft 29540427ccaSGordon Tetlow# languageID (0~english Macintosh, 0409h~english Microsoft, ...) 296*43a5ec4eSXin LI>>>>>&2 ubeshort >0 \b, language %#x 29740427ccaSGordon Tetlow# name identifiers 29840427ccaSGordon Tetlow# often 0~copyright, 1~font, 2~font subfamily, 5~version, 13~license, 19~sample, ... 29940427ccaSGordon Tetlow>>>>>&4 ubeshort >0 \b, type %d string 30040427ccaSGordon Tetlow# platform specific encoding: 30140427ccaSGordon Tetlow# 0~undefined character set, 1~UGL set with Unicode, 3~Unicode 2.0 BMP only, 4~Unicode 2.0 30240427ccaSGordon Tetlow#>>>>>&0 ubeshort x \b, %d encoding 30340427ccaSGordon Tetlow>>>>>&0 ubeshort 0 30440427ccaSGordon Tetlow# handle only name string offset 0 because do not know how to add 2 relative offsets 30540427ccaSGordon Tetlow>>>>>>&6 ubeshort 0 30640427ccaSGordon Tetlow>>>>>>>&(&-14.S-18) ubyte !0 30740427ccaSGordon Tetlow# GRR: instead 806 only first MAXstring = 96 characters are displayed as defined in src\file.h 30840427ccaSGordon Tetlow# often copyright string that starts like \251 2006 The Monotype Corporation 30940427ccaSGordon Tetlow>>>>>>>>&-1 string x \b, %-11.96s 31040427ccaSGordon Tetlow# test for unicode string 31140427ccaSGordon Tetlow>>>>>>>&(&-14.S-18) ubyte 0 31240427ccaSGordon Tetlow>>>>>>>>&0 lestring16 x \b, %-11.96s 31340427ccaSGordon Tetlow# unicode encoding 31440427ccaSGordon Tetlow>>>>>&0 ubeshort >0 31540427ccaSGordon Tetlow>>>>>>&6 ubeshort 0 31640427ccaSGordon Tetlow>>>>>>>&(&-14.S-17) lestring16 x \b, %-11.96s 317b6cee71dSXin LI 318b6cee71dSXin LI0 string \007\001\001\000Copyright\ (c)\ 199 Adobe Multiple Master font 319b6cee71dSXin LI0 string \012\001\001\000Copyright\ (c)\ 199 Adobe Multiple Master font 320b6cee71dSXin LI 321b6cee71dSXin LI# TrueType/OpenType font collections (.ttc) 32240427ccaSGordon Tetlow# URL: https://en.wikipedia.org/wiki/OpenType 32348c779cdSXin LI# https://www.microsoft.com/typography/otspec/otff.htm 32440427ccaSGordon Tetlow# Modified by: Joerg Jenderek 32540427ccaSGordon Tetlow# Note: container for TrueType, OpenType font 32640427ccaSGordon Tetlow0 string ttcf 32740427ccaSGordon Tetlow# skip ASCII text 32840427ccaSGordon Tetlow>4 ubyte 0 32940427ccaSGordon Tetlow# sfnt version often 0x00010000 of 1st table is TrueType 33040427ccaSGordon Tetlow>>(12.L) ubelong !0x4f54544f TrueType 33148c779cdSXin LI!:mime font/ttf 33240427ccaSGordon Tetlow!:apple ????tfil 33340427ccaSGordon Tetlow!:ext ttc 33440427ccaSGordon Tetlow# sfnt version 4F54544Fh~OTTO of 1st table is OpenType font 33540427ccaSGordon Tetlow>>(12.L) ubelong =0x4f54544f OpenType 33648c779cdSXin LI!:mime font/otf 33740427ccaSGordon Tetlow!:apple ????OTTO 33840427ccaSGordon Tetlow# no example found for otc 33940427ccaSGordon Tetlow!:ext ttc/otc 34040427ccaSGordon Tetlow>>4 ubyte x font collection data 34140427ccaSGordon Tetlow#!:mime font/collection 34240427ccaSGordon Tetlow# TCC version 34340427ccaSGordon Tetlow>>4 belong 0x00010000 \b, 1.0 34440427ccaSGordon Tetlow>>4 belong 0x00020000 \b, 2.0 34540427ccaSGordon Tetlow>>8 ubelong >0 \b, %d fonts 34640427ccaSGordon Tetlow# array offset size = fonts * offsetsize = fonts * 4 34740427ccaSGordon Tetlow>>(8.L*4) ubequad x 348b6cee71dSXin LI# 0x44454947 = 'DSIG' 34940427ccaSGordon Tetlow>>>&4 belong 0x44534947 \b, digitally signed 35040427ccaSGordon Tetlow# offset to 1st font 351*43a5ec4eSXin LI>>12 ubelong x \b, at %#x 35240427ccaSGordon Tetlow# point to 1st font that starts with sfnt version 35340427ccaSGordon Tetlow>>(12.L) use sfnt-font 354b6cee71dSXin LI 355b6cee71dSXin LI# Opentype font data from Avi Bercovich 356b6cee71dSXin LI0 string OTTO OpenType font data 357b6cee71dSXin LI!:mime application/vnd.ms-opentype 358b6cee71dSXin LI 35958a0f0d0SEitan Adler# From: Alex Myczko <alex@aiei.ch> 360b6cee71dSXin LI0 string SplineFontDB: Spline Font Database 361b6cee71dSXin LI!:mime application/vnd.font-fontforge-sfd 362b6cee71dSXin LI>14 string x version %s 363b6cee71dSXin LI 364b6cee71dSXin LI# EOT 365a5d223e6SXin LI0x40 string \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0 366a5d223e6SXin LI>0x22 string LP Embedded OpenType (EOT) 367a5d223e6SXin LI# workaround until there's lepstring16 368a5d223e6SXin LI# >>0x52 lepstring16/h >\0 \b, %s family 369a5d223e6SXin LI>>0x52 short !0 370a5d223e6SXin LI>>>0x54 lestring16 x \b, %s family 371b6cee71dSXin LI!:mime application/vnd.ms-fontobject 372b6cee71dSXin LI 373b6cee71dSXin LI# Web Open Font Format (.woff) 3743e41d09dSXin LI0 name woff 3753e41d09dSXin LI>4 belong 0x00010000 \b, TrueType 3763e41d09dSXin LI>4 belong 0x4F54544F \b, CFF 3773e41d09dSXin LI>4 belong 0x74727565 \b, TrueType 3783e41d09dSXin LI>4 default x 3793e41d09dSXin LI>>4 belong x \b, flavor %d 3803e41d09dSXin LI>8 belong x \b, length %d 3813e41d09dSXin LI#>12 beshort x \b, numTables %d 3823e41d09dSXin LI#>14 beshort x \b, reserved %d 3833e41d09dSXin LI#>16 belong x \b, totalSfntSize %d 3843e41d09dSXin LI 38548c779cdSXin LI# https://www.w3.org/TR/WOFF/ 386b6cee71dSXin LI0 string wOFF Web Open Font Format 3873e41d09dSXin LI>0 use woff 388b6cee71dSXin LI>20 beshort x \b, version %d 389b6cee71dSXin LI>22 beshort x \b.%d 39048c779cdSXin LI# https://www.w3.org/TR/WOFF2/ 3913e41d09dSXin LI0 string wOF2 Web Open Font Format (Version 2) 3923e41d09dSXin LI>0 use woff 3933e41d09dSXin LI#>20 belong x \b, totalCompressedSize %d 3943e41d09dSXin LI>24 beshort x \b, version %d 3953e41d09dSXin LI>26 beshort x \b.%d 396