Clean up
This commit is contained in:
parent
d574182374
commit
d600b7b32e
40 changed files with 0 additions and 54512 deletions
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 712 B |
Binary file not shown.
|
Before Width: | Height: | Size: 455 B |
Binary file not shown.
|
Before Width: | Height: | Size: 788 B |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1 +0,0 @@
|
|||
{"v":"5.5.9","fr":60,"ip":0,"op":20,"w":72,"h":72,"nm":"ic_mute","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"Path 4","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[34.5,37.5,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-8.5,-8.5],[8.5,8.5]],"c":false},"ix":2},"nm":"Контур 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":1.33,"ix":5},"lc":2,"lj":1,"ml":4,"bm":0,"nm":"Обводка 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[300,300],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Преобразовать"}],"nm":"Path 4","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"tm","s":{"a":0,"k":0,"ix":1},"e":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":0,"s":[0]},{"t":10,"s":[100]}],"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":2,"nm":"Обрезать контуры 1","mn":"ADBE Vector Filter - Trim","hd":false}],"ip":0,"op":20,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"Path 5","td":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[34.5,37.5,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-8.5,-8.5],[8.5,8.5]],"c":false},"ix":2},"nm":"Контур 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.109803922474,0.109803922474,0.117647059262,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":4,"ix":5},"lc":2,"lj":1,"ml":4,"bm":0,"nm":"Обводка 2","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[300,300],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Преобразовать"}],"nm":"Path 4","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"tm","s":{"a":0,"k":0,"ix":1},"e":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":0,"s":[0]},{"t":10,"s":[100]}],"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":2,"nm":"Обрезать контуры 1","mn":"ADBE Vector Filter - Trim","hd":false}],"ip":0,"op":20,"st":0,"bm":0},{"ddd":0,"ind":3,"ty":4,"nm":"Icon","tt":2,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[36,37.2,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[-0.36,0],[0,-0.36],[3.81,-0.34],[0,0],[0.37,0],[0.04,0.32],[0,0],[0,0],[0,3.9],[-0.36,0],[0,-0.36],[-3.38,0],[0,3.39]],"o":[[0.37,0],[0,3.9],[0,0],[0,0.37],[-0.33,0],[0,0],[0,0],[-3.81,-0.34],[0,-0.36],[0.37,0],[0,3.39],[3.39,0],[0,-0.36]],"v":[[6.796,-1.464],[7.466,-0.804],[0.666,6.636],[0.666,9.196],[-0.004,9.866],[-0.654,9.286],[-0.664,9.196],[-0.664,6.636],[-7.464,-0.804],[-6.804,-1.464],[-6.134,-0.804],[-0.004,5.336],[6.136,-0.804]],"c":true},"ix":2},"nm":"Контур 1","mn":"ADBE Vector Shape - Group","hd":false},{"ind":1,"ty":"sh","ix":2,"ks":{"a":0,"k":{"i":[[-2.35,0],[-0.09,-2.28],[0,0],[0,0],[2.36,0],[0.1,2.27],[0,0],[0,0]],"o":[[2.3,0],[0,0],[0,0],[0,2.36],[-2.29,0],[0,0],[0,0],[0,-2.35]],"v":[[-0.004,-9.864],[4.256,-5.774],[4.266,-5.604],[4.266,-0.804],[-0.004,3.466],[-4.264,-0.624],[-4.264,-0.804],[-4.264,-5.604]],"c":true},"ix":2},"nm":"Контур 2","mn":"ADBE Vector Shape - Group","hd":false},{"ind":2,"ty":"sh","ix":3,"ks":{"a":0,"k":{"i":[[1.62,0],[0.09,-1.55],[0,0],[0,0],[-1.63,0],[-0.08,1.55],[0,0],[0,0]],"o":[[-1.57,0],[0,0],[0,0],[0,1.62],[1.57,0],[0,0],[0,0],[0,-1.63]],"v":[[0.004,-8.536],[-2.936,-5.756],[-2.936,-5.596],[-2.936,-0.796],[0.004,2.134],[2.934,-0.646],[2.934,-0.796],[2.934,-5.596]],"c":true},"ix":2},"nm":"Контур 3","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"mm","mm":1,"nm":"Объединить контуры 1","mn":"ADBE Vector Filter - Merge","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Заливка 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[300,300],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Преобразовать"}],"nm":"Icon","np":5,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":20,"st":0,"bm":0}],"markers":[]}
|
||||
File diff suppressed because one or more lines are too long
BIN
submodules/TelegramUI/Resources/Fonts/latinmodern-math.otf
Executable file → Normal file
BIN
submodules/TelegramUI/Resources/Fonts/latinmodern-math.otf
Executable file → Normal file
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load diff
Binary file not shown.
File diff suppressed because it is too large
Load diff
Binary file not shown.
File diff suppressed because it is too large
Load diff
|
|
@ -1,30 +0,0 @@
|
|||
% This is a preliminary version (2006-09-30), barring acceptance from
|
||||
% the LaTeX Project Team and other feedback, of the GUST Font License.
|
||||
% (GUST is the Polish TeX Users Group, http://www.gust.org.pl)
|
||||
%
|
||||
% For the most recent version of this license see
|
||||
% http://www.gust.org.pl/fonts/licenses/GUST-FONT-LICENSE.txt
|
||||
% or
|
||||
% http://tug.org/fonts/licenses/GUST-FONT-LICENSE.txt
|
||||
%
|
||||
% This work may be distributed and/or modified under the conditions
|
||||
% of the LaTeX Project Public License, either version 1.3c of this
|
||||
% license or (at your option) any later version.
|
||||
%
|
||||
% Please also observe the following clause:
|
||||
% 1) it is requested, but not legally required, that derived works be
|
||||
% distributed only after changing the names of the fonts comprising this
|
||||
% work and given in an accompanying "manifest", and that the
|
||||
% files comprising the Work, as listed in the manifest, also be given
|
||||
% new names. Any exceptions to this request are also given in the
|
||||
% manifest.
|
||||
%
|
||||
% We recommend the manifest be given in a separate file named
|
||||
% MANIFEST-<fontid>.txt, where <fontid> is some unique identification
|
||||
% of the font family. If a separate "readme" file accompanies the Work,
|
||||
% we recommend a name of the form README-<fontid>.txt.
|
||||
%
|
||||
% The latest version of the LaTeX Project Public License is in
|
||||
% http://www.latex-project.org/lppl.txt and version 1.3c or later
|
||||
% is part of all distributions of LaTeX version 2006/05/20 or later.
|
||||
|
||||
Binary file not shown.
File diff suppressed because it is too large
Load diff
Binary file not shown.
File diff suppressed because it is too large
Load diff
Binary file not shown.
File diff suppressed because it is too large
Load diff
|
|
@ -1,21 +0,0 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2013 MathChat
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
Binary file not shown.
File diff suppressed because it is too large
Load diff
Binary file not shown.
File diff suppressed because it is too large
Load diff
Binary file not shown.
File diff suppressed because it is too large
Load diff
|
|
@ -1,103 +0,0 @@
|
|||
STIX Font License
|
||||
|
||||
24 May 2010
|
||||
|
||||
Copyright (c) 2001-2010 by the STI Pub Companies, consisting of the American
|
||||
Institute of Physics, the American Chemical Society, the American Mathematical
|
||||
Society, the American Physical Society, Elsevier, Inc., and The Institute of
|
||||
Electrical and Electronic Engineers, Inc. (www.stixfonts.org), with Reserved
|
||||
Font Name STIX Fonts, STIX Fonts (TM) is a trademark of The Institute of
|
||||
Electrical and Electronics Engineers, Inc.
|
||||
|
||||
Portions copyright (c) 1998-2003 by MicroPress, Inc. (www.micropress-inc.com),
|
||||
with Reserved Font Name TM Math. To obtain additional mathematical fonts, please
|
||||
contact MicroPress, Inc., 68-30 Harrow Street, Forest Hills, NY 11375, USA,
|
||||
Phone: (718) 575-1816.
|
||||
|
||||
Portions copyright (c) 1990 by Elsevier, Inc.
|
||||
|
||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||
This license is copied below, and is also available with a FAQ at:
|
||||
http://scripts.sil.org/OFL
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
PREAMBLE
|
||||
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide development
|
||||
of collaborative font projects, to support the font creation efforts of academic
|
||||
and linguistic communities, and to provide a free and open framework in which
|
||||
fonts may be shared and improved in partnership with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and redistributed
|
||||
freely as long as they are not sold by themselves. The fonts, including any
|
||||
derivative works, can be bundled, embedded, redistributed and/or sold with any
|
||||
software provided that any reserved names are not used by derivative works. The
|
||||
fonts and derivatives, however, cannot be released under any other type of license.
|
||||
The requirement for fonts to remain under this license does not apply to any
|
||||
document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
|
||||
"Font Software" refers to the set of files released by the Copyright Holder(s) under
|
||||
this license and clearly marked as such. This may include source files, build
|
||||
scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the copyright
|
||||
statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components as
|
||||
distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting, or
|
||||
substituting -- in part or in whole -- any of the components of the Original Version,
|
||||
by changing formats or by porting the Font Software to a new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical writer or other
|
||||
person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of the
|
||||
Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell
|
||||
modified and unmodified copies of the Font Software, subject to the following
|
||||
conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components, in Original or
|
||||
Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled, redistributed
|
||||
and/or sold with any software, provided that each copy contains the above copyright
|
||||
notice and this license. These can be included either as stand-alone text files,
|
||||
human-readable headers or in the appropriate machine-readable metadata fields within
|
||||
text or binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font Name(s) unless
|
||||
explicit written permission is granted by the corresponding Copyright Holder. This
|
||||
restriction only applies to the primary font name as presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall
|
||||
not be used to promote, endorse or advertise any Modified Version, except to
|
||||
acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with
|
||||
their explicit written permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole, must be distributed
|
||||
entirely under this license, and must not be distributed under any other license. The
|
||||
requirement for fonts to remain under this license does not apply to any document
|
||||
created using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
|
||||
This license becomes null and void if any of the above conditions are not met.
|
||||
|
||||
DISCLAIMER
|
||||
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
||||
PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER
|
||||
RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES,
|
||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR
|
||||
INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.
|
||||
Binary file not shown.
Binary file not shown.
|
|
@ -1,205 +0,0 @@
|
|||
#!/usr/local/bin/python3
|
||||
import plistlib
|
||||
import sys
|
||||
from fontTools.ttLib import TTFont
|
||||
|
||||
def usage(code):
|
||||
print('Usage math_table_to_plist.py <fontfile> <plistfile>')
|
||||
sys.exit(code)
|
||||
|
||||
def process_font(font_file, out_file):
|
||||
font = TTFont(font_file)
|
||||
math_table = font['MATH'].table
|
||||
constants = get_constants(math_table)
|
||||
italic_c = get_italic_correction(math_table)
|
||||
v_variants = get_v_variants(math_table)
|
||||
h_variants = get_h_variants(math_table)
|
||||
assembly = get_v_assembly(math_table)
|
||||
accents = get_accent_attachments(math_table)
|
||||
pl = {
|
||||
"version" : "1.3",
|
||||
"constants": constants,
|
||||
"v_variants" : v_variants,
|
||||
"h_variants" : h_variants,
|
||||
"italic" : italic_c,
|
||||
"accents" : accents,
|
||||
"v_assembly" : assembly }
|
||||
ofile = open(out_file, 'w+b')
|
||||
plistlib.dump(pl, ofile)
|
||||
ofile.close()
|
||||
|
||||
def get_constants(math_table):
|
||||
constants = math_table.MathConstants
|
||||
if constants is None:
|
||||
raise 'Cannot find MathConstants in MATH table'
|
||||
|
||||
int_consts = [ 'ScriptPercentScaleDown',
|
||||
'ScriptScriptPercentScaleDown',
|
||||
'DelimitedSubFormulaMinHeight',
|
||||
'DisplayOperatorMinHeight',
|
||||
'RadicalDegreeBottomRaisePercent']
|
||||
consts = { c : getattr(constants, c) for c in int_consts }
|
||||
|
||||
record_consts = [ 'MathLeading',
|
||||
'AxisHeight',
|
||||
'AccentBaseHeight',
|
||||
'FlattenedAccentBaseHeight',
|
||||
'SubscriptShiftDown',
|
||||
'SubscriptTopMax',
|
||||
'SubscriptBaselineDropMin',
|
||||
'SuperscriptShiftUp',
|
||||
'SuperscriptShiftUpCramped',
|
||||
'SuperscriptBottomMin',
|
||||
'SuperscriptBaselineDropMax',
|
||||
'SubSuperscriptGapMin',
|
||||
'SuperscriptBottomMaxWithSubscript',
|
||||
'SpaceAfterScript',
|
||||
'UpperLimitGapMin',
|
||||
'UpperLimitBaselineRiseMin',
|
||||
'LowerLimitGapMin',
|
||||
'LowerLimitBaselineDropMin',
|
||||
'StackTopShiftUp',
|
||||
'StackTopDisplayStyleShiftUp',
|
||||
'StackBottomShiftDown',
|
||||
'StackBottomDisplayStyleShiftDown',
|
||||
'StackGapMin',
|
||||
'StackDisplayStyleGapMin',
|
||||
'StretchStackTopShiftUp',
|
||||
'StretchStackBottomShiftDown',
|
||||
'StretchStackGapAboveMin',
|
||||
'StretchStackGapBelowMin',
|
||||
'FractionNumeratorShiftUp',
|
||||
'FractionNumeratorDisplayStyleShiftUp',
|
||||
'FractionDenominatorShiftDown',
|
||||
'FractionDenominatorDisplayStyleShiftDown',
|
||||
'FractionNumeratorGapMin',
|
||||
'FractionNumDisplayStyleGapMin',
|
||||
'FractionRuleThickness',
|
||||
'FractionDenominatorGapMin',
|
||||
'FractionDenomDisplayStyleGapMin',
|
||||
'SkewedFractionHorizontalGap',
|
||||
'SkewedFractionVerticalGap',
|
||||
'OverbarVerticalGap',
|
||||
'OverbarRuleThickness',
|
||||
'OverbarExtraAscender',
|
||||
'UnderbarVerticalGap',
|
||||
'UnderbarRuleThickness',
|
||||
'UnderbarExtraDescender',
|
||||
'RadicalVerticalGap',
|
||||
'RadicalDisplayStyleVerticalGap',
|
||||
'RadicalRuleThickness',
|
||||
'RadicalExtraAscender',
|
||||
'RadicalKernBeforeDegree',
|
||||
'RadicalKernAfterDegree',
|
||||
]
|
||||
consts_2 = { c : getattr(constants, c).Value for c in record_consts }
|
||||
consts.update(consts_2)
|
||||
|
||||
variants = math_table.MathVariants
|
||||
consts['MinConnectorOverlap'] = variants.MinConnectorOverlap
|
||||
return consts
|
||||
|
||||
def get_italic_correction(math_table):
|
||||
glyph_info = math_table.MathGlyphInfo
|
||||
if glyph_info is None:
|
||||
raise "Cannot find MathGlyphInfo in MATH table."
|
||||
italic = glyph_info.MathItalicsCorrectionInfo
|
||||
if italic is None:
|
||||
raise "Cannot find Italic Correction in GlyphInfo"
|
||||
|
||||
glyphs = italic.Coverage.glyphs
|
||||
count = italic.ItalicsCorrectionCount
|
||||
records = italic.ItalicsCorrection
|
||||
italic_dict = {}
|
||||
for i in range(count):
|
||||
name = glyphs[i]
|
||||
record = records[i]
|
||||
if record.DeviceTable is not None:
|
||||
raise "Don't know how to process device table for italic correction."
|
||||
italic_dict[name] = record.Value
|
||||
return italic_dict
|
||||
|
||||
def get_accent_attachments(math_table):
|
||||
glyph_info = math_table.MathGlyphInfo
|
||||
if glyph_info is None:
|
||||
raise "Cannot find MathGlyphInfo in MATH table."
|
||||
attach = glyph_info.MathTopAccentAttachment
|
||||
if attach is None:
|
||||
raise "Cannot find Top Accent Attachment in GlyphInfo"
|
||||
|
||||
glyphs = attach.TopAccentCoverage.glyphs
|
||||
count = attach.TopAccentAttachmentCount
|
||||
records = attach.TopAccentAttachment
|
||||
attach_dict = {}
|
||||
for i in range(count):
|
||||
name = glyphs[i]
|
||||
record = records[i]
|
||||
if record.DeviceTable is not None:
|
||||
raise "Don't know how to process device table for accent attachment."
|
||||
attach_dict[name] = record.Value
|
||||
return attach_dict
|
||||
|
||||
def get_v_variants(math_table):
|
||||
variants = math_table.MathVariants
|
||||
vglyphs = variants.VertGlyphCoverage.glyphs
|
||||
vconstruction = variants.VertGlyphConstruction
|
||||
count = variants.VertGlyphCount
|
||||
variant_dict = {}
|
||||
for i in range(count):
|
||||
name = vglyphs[i]
|
||||
record = vconstruction[i]
|
||||
glyph_variants = [x.VariantGlyph for x in
|
||||
record.MathGlyphVariantRecord]
|
||||
variant_dict[name] = glyph_variants
|
||||
return variant_dict
|
||||
|
||||
def get_h_variants(math_table):
|
||||
variants = math_table.MathVariants
|
||||
hglyphs = variants.HorizGlyphCoverage.glyphs
|
||||
hconstruction = variants.HorizGlyphConstruction
|
||||
count = variants.HorizGlyphCount
|
||||
variant_dict = {}
|
||||
for i in range(count):
|
||||
name = hglyphs[i]
|
||||
record = hconstruction[i]
|
||||
glyph_variants = [x.VariantGlyph for x in
|
||||
record.MathGlyphVariantRecord]
|
||||
variant_dict[name] = glyph_variants
|
||||
return variant_dict
|
||||
|
||||
def get_v_assembly(math_table):
|
||||
variants = math_table.MathVariants
|
||||
vglyphs = variants.VertGlyphCoverage.glyphs
|
||||
vconstruction = variants.VertGlyphConstruction
|
||||
count = variants.VertGlyphCount
|
||||
assembly_dict = {}
|
||||
for i in range(count):
|
||||
name = vglyphs[i]
|
||||
record = vconstruction[i]
|
||||
assembly = record.GlyphAssembly
|
||||
if assembly is not None:
|
||||
# There is an assembly for this glyph
|
||||
italic = assembly.ItalicsCorrection.Value
|
||||
parts = [part_dict(part) for part in assembly.PartRecords]
|
||||
assembly_dict[name] = {
|
||||
"italic" : assembly.ItalicsCorrection.Value,
|
||||
"parts" : parts }
|
||||
return assembly_dict
|
||||
|
||||
def part_dict(part):
|
||||
return {
|
||||
"glyph": part.glyph,
|
||||
"startConnector" : part.StartConnectorLength,
|
||||
"endConnector" : part.EndConnectorLength,
|
||||
"advance" : part.FullAdvance,
|
||||
"extender" : (part.PartFlags == 1) }
|
||||
|
||||
def main():
|
||||
if len(sys.argv) != 3:
|
||||
usage(1)
|
||||
font_file = sys.argv[1]
|
||||
plist_file = sys.argv[2]
|
||||
process_font(font_file, plist_file)
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue