Rename package and address warnings

This commit is contained in:
Guille Gonzalez
2025-12-30 14:45:54 +01:00
parent c49362fcf1
commit 5774724d18
59 changed files with 19 additions and 112 deletions

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

View File

@@ -0,0 +1,30 @@
% 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

View File

@@ -0,0 +1,21 @@
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

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,103 @@
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.

View File

@@ -0,0 +1,205 @@
#!/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.

File diff suppressed because it is too large Load Diff