text stringlengths 0 1.05M | meta dict |
|---|---|
from fontTools.misc import sstruct
from fontTools.misc.textTools import safeEval
from fontTools.misc.fixedTools import (
ensureVersionIsLong as fi2ve, versionToFixed as ve2fi)
from . import DefaultTable
import math
hheaFormat = """
> # big endian
tableVersion: L
ascent: h
descent: ... | {
"repo_name": "google/material-design-icons",
"path": "update/venv/lib/python3.9/site-packages/fontTools/ttLib/tables/_h_h_e_a.py",
"copies": "5",
"size": "3655",
"license": "apache-2.0",
"hash": 7781337394419622000,
"line_mean": 28.7154471545,
"line_max": 109,
"alpha_frac": 0.6714090287,
"autogene... |
from fontTools.misc import sstruct
from fontTools.misc.textTools import safeEval
from fontTools.misc.timeTools import timestampFromString, timestampToString
from . import DefaultTable
FFTMFormat = """
> # big endian
version: I
FFTimeStamp: Q
sourceCreated: Q
sourceModified: Q
"""
class table_F_F_... | {
"repo_name": "google/material-design-icons",
"path": "update/venv/lib/python3.9/site-packages/fontTools/ttLib/tables/F_F_T_M_.py",
"copies": "5",
"size": "1188",
"license": "apache-2.0",
"hash": -4934979615568756000,
"line_mean": 28.7,
"line_max": 86,
"alpha_frac": 0.7272727273,
"autogenerated": f... |
from fontTools.misc import sstruct
from fontTools.misc.textTools import safeEval
from . import DefaultTable
import array
import itertools
import logging
import struct
import sys
import fontTools.ttLib.tables.TupleVariation as tv
log = logging.getLogger(__name__)
TupleVariation = tv.TupleVariation
# https://www.micr... | {
"repo_name": "google/material-design-icons",
"path": "update/venv/lib/python3.9/site-packages/fontTools/ttLib/tables/_g_v_a_r.py",
"copies": "4",
"size": "7809",
"license": "apache-2.0",
"hash": 7218267838003962000,
"line_mean": 31.9493670886,
"line_max": 117,
"alpha_frac": 0.7155845819,
"autogene... |
from fontTools.misc import sstruct
from fontTools.misc.textTools import safeEval
from . import DefaultTable
import array
import sys
Gloc_header = '''
> # big endian
version: 16.16F # Table version
flags: H # bit 0: 1=long format, 0=short format
# bit 1: 1=attribu... | {
"repo_name": "google/material-design-icons",
"path": "update/venv/lib/python3.9/site-packages/fontTools/ttLib/tables/G__l_o_c.py",
"copies": "5",
"size": "2444",
"license": "apache-2.0",
"hash": -8539774471890281000,
"line_mean": 33.4225352113,
"line_max": 85,
"alpha_frac": 0.5981996727,
"autogene... |
from fontTools.misc import sstruct
from fontTools.misc.textTools import safeEval
from . import DefaultTable
maxpFormat_0_5 = """
> # big endian
tableVersion: i
numGlyphs: H
"""
maxpFormat_1_0_add = """
> # big endian
maxPoints: H
maxContours: H
maxComposite... | {
"repo_name": "google/material-design-icons",
"path": "update/venv/lib/python3.9/site-packages/fontTools/ttLib/tables/_m_a_x_p.py",
"copies": "5",
"size": "4191",
"license": "apache-2.0",
"hash": 4595524123746714000,
"line_mean": 29.3695652174,
"line_max": 77,
"alpha_frac": 0.6848007635,
"autogener... |
from fontTools.misc import sstruct
from fontTools.misc.textTools import safeEval
from .sbixGlyph import Glyph
import struct
sbixStrikeHeaderFormat = """
>
ppem: H # The PPEM for which this strike was designed (e.g., 9,
# 12, 24)
resolution: H # The screen resolution (in dpi) for which this strike
... | {
"repo_name": "google/material-design-icons",
"path": "update/venv/lib/python3.9/site-packages/fontTools/ttLib/tables/sbixStrike.py",
"copies": "5",
"size": "5381",
"license": "apache-2.0",
"hash": 5304069938728959000,
"line_mean": 35.3581081081,
"line_max": 109,
"alpha_frac": 0.7277457722,
"autoge... |
from fontTools.misc import sstruct
from fontTools.misc.textTools import safeEval, num2binary, binary2num
from . import DefaultTable
from .sbixStrike import Strike
sbixHeaderFormat = """
>
version: H # Version number (set to 1)
flags: H # The only two bits used in the flags field are bits 0
# an... | {
"repo_name": "google/material-design-icons",
"path": "update/venv/lib/python3.9/site-packages/fontTools/ttLib/tables/_s_b_i_x.py",
"copies": "5",
"size": "3877",
"license": "apache-2.0",
"hash": 5220686403355826000,
"line_mean": 32.7130434783,
"line_max": 87,
"alpha_frac": 0.7211761671,
"autogener... |
from fontTools.misc import transform
from fontParts.base.base import (
BaseObject,
TransformationMixin,
PointPositionMixin,
SelectionMixin,
dynamicProperty,
reference
)
from fontParts.base import normalizers
from fontParts.base.color import Color
from fontParts.base.deprecated import DeprecatedI... | {
"repo_name": "robofab-developers/fontParts",
"path": "Lib/fontParts/base/image.py",
"copies": "1",
"size": "7838",
"license": "mit",
"hash": -6608405628462105000,
"line_mean": 24.2838709677,
"line_max": 78,
"alpha_frac": 0.5463128349,
"autogenerated": false,
"ratio": 4.337576092971776,
"config... |
from fontTools.misc import transform
from fontParts.base.base import (
BaseObject,
TransformationMixin,
PointPositionMixin,
SelectionMixin,
IdentifierMixin,
dynamicProperty,
reference
)
from fontParts.base import normalizers
from fontParts.base.deprecated import DeprecatedPoint, RemovedPoint... | {
"repo_name": "robofab-developers/fontParts",
"path": "Lib/fontParts/base/point.py",
"copies": "1",
"size": "10725",
"license": "mit",
"hash": 7361228647517777000,
"line_mean": 24.4750593824,
"line_max": 78,
"alpha_frac": 0.526993007,
"autogenerated": false,
"ratio": 4.523407844791227,
"config_... |
from fontTools.misc import transform
from fontParts.base.base import (
BaseObject,
TransformationMixin,
SelectionMixin,
IdentifierMixin,
dynamicProperty,
reference
)
from fontParts.base.errors import FontPartsError
from fontParts.base import normalizers
from fontParts.base.deprecated import Depr... | {
"repo_name": "robofab-developers/fontParts",
"path": "Lib/fontParts/base/bPoint.py",
"copies": "1",
"size": "12012",
"license": "mit",
"hash": 9082269576670819000,
"line_mean": 28.2262773723,
"line_max": 79,
"alpha_frac": 0.5357975358,
"autogenerated": false,
"ratio": 4.2221441124780315,
"conf... |
from fontTools.misc import transform
from fontParts.base import normalizers
from fontParts.base.base import (
BaseObject, TransformationMixin, InterpolationMixin, SelectionMixin,
PointPositionMixin, IdentifierMixin, dynamicProperty, reference
)
from fontParts.base.compatibility import AnchorCompatibilityReporte... | {
"repo_name": "robofab-developers/fontParts",
"path": "Lib/fontParts/base/anchor.py",
"copies": "1",
"size": "10042",
"license": "mit",
"hash": 3567398996134753000,
"line_mean": 24.3585858586,
"line_max": 79,
"alpha_frac": 0.5468034256,
"autogenerated": false,
"ratio": 4.489047831917747,
"confi... |
from fontTools.misc import transform
from fontParts.base import normalizers
from fontParts.base.errors import FontPartsError
from fontParts.base.base import (
BaseObject,
TransformationMixin,
InterpolationMixin,
PointPositionMixin,
SelectionMixin,
IdentifierMixin,
dynamicProperty,
refere... | {
"repo_name": "robofab-developers/fontParts",
"path": "Lib/fontParts/base/component.py",
"copies": "1",
"size": "11222",
"license": "mit",
"hash": 3147005493123733500,
"line_mean": 26.7772277228,
"line_max": 81,
"alpha_frac": 0.5661201212,
"autogenerated": false,
"ratio": 4.586023702492849,
"co... |
from fontTools.misc import xmlWriter
from fontTools.misc.py23 import Tag, byteord, tostr
from fontTools.misc.loggingTools import deprecateArgument
from fontTools.ttLib import TTLibError
from fontTools.ttLib.sfnt import SFNTReader, SFNTWriter
from io import BytesIO, StringIO
import os
import logging
import traceback
lo... | {
"repo_name": "google/material-design-icons",
"path": "update/venv/lib/python3.9/site-packages/fontTools/ttLib/ttFont.py",
"copies": "5",
"size": "33434",
"license": "apache-2.0",
"hash": 2426428006813346300,
"line_mean": 30.3052434457,
"line_max": 156,
"alpha_frac": 0.6979123048,
"autogenerated": ... |
from fontTools.misc.psCharStrings import T2CharString
from ufo2fdk.pens import RelativeCoordinatePen, roundInt, roundIntPoint
class T2CharStringPen(RelativeCoordinatePen):
def __init__(self, width, glyphSet):
RelativeCoordinatePen.__init__(self, glyphSet)
self._heldMove = None
self._progr... | {
"repo_name": "adrientetar/ufo2fdk",
"path": "Lib/ufo2fdk/pens/t2CharStringPen.py",
"copies": "5",
"size": "1805",
"license": "mit",
"hash": 3649745401133690000,
"line_mean": 30.1206896552,
"line_max": 107,
"alpha_frac": 0.6210526316,
"autogenerated": false,
"ratio": 3.418560606060606,
"config_... |
from fontTools.misc.py23 import basestring
class Color(str):
"""
This object represents a color. This object is immutable.
The initial argument can be either a color string as defined in the UFO
specification or a sequence of (red, green, blue, alpha) components.
By calling str(colorObject) you... | {
"repo_name": "typesupply/defcon",
"path": "Lib/defcon/objects/color.py",
"copies": "2",
"size": "2930",
"license": "mit",
"hash": 5391988265734510000,
"line_mean": 23.6218487395,
"line_max": 103,
"alpha_frac": 0.5225255973,
"autogenerated": false,
"ratio": 3.5995085995085994,
"config_test": fa... |
from fontTools.misc.py23 import bytechr, byteord, bytesjoin, strjoin
from fontTools.misc import sstruct
from fontTools.misc.textTools import safeEval, readHex, hexStr, deHexStr
from .BitmapGlyphMetrics import BigGlyphMetrics, bigGlyphMetricsFormat, SmallGlyphMetrics, smallGlyphMetricsFormat
from . import DefaultTable
i... | {
"repo_name": "google/material-design-icons",
"path": "update/venv/lib/python3.9/site-packages/fontTools/ttLib/tables/E_B_D_T_.py",
"copies": "5",
"size": "27208",
"license": "apache-2.0",
"hash": 5467771397501304000,
"line_mean": 34.7060367454,
"line_max": 120,
"alpha_frac": 0.7298221111,
"autogen... |
from fontTools.misc.py23 import bytechr, byteord, bytesjoin, tobytes, tostr
from fontTools.misc import eexec
from .psOperators import (
PSOperators,
ps_StandardEncoding,
ps_array,
ps_boolean,
ps_dict,
ps_integer,
ps_literal,
ps_mark,
ps_name,
ps_operator,
ps_procedure,
ps_procmark,
ps_real,
ps_string,
)
i... | {
"repo_name": "google/material-design-icons",
"path": "update/venv/lib/python3.9/site-packages/fontTools/misc/psLib.py",
"copies": "5",
"size": "9568",
"license": "apache-2.0",
"hash": -7469683989417939000,
"line_mean": 23.9166666667,
"line_max": 94,
"alpha_frac": 0.6484113712,
"autogenerated": fal... |
from fontTools.misc.py23 import bytechr, byteord, strjoin
from fontTools.misc import sstruct
from . import DefaultTable
import array
from collections.abc import Mapping
hdmxHeaderFormat = """
> # big endian!
version: H
numRecords: H
recordSize: l
"""
class _GlyphnamedList(Mapping):
def __init__(self, reverseG... | {
"repo_name": "google/material-design-icons",
"path": "update/venv/lib/python3.9/site-packages/fontTools/ttLib/tables/_h_d_m_x.py",
"copies": "5",
"size": "3335",
"license": "apache-2.0",
"hash": -7135055486401276000,
"line_mean": 27.75,
"line_max": 95,
"alpha_frac": 0.6554722639,
"autogenerated": ... |
from fontTools.misc.py23 import bytechr, byteord, tobytes, tostr
from fontTools import ttLib
from fontTools.ttLib.standardGlyphOrder import standardGlyphOrder
from fontTools.misc import sstruct
from fontTools.misc.textTools import safeEval, readHex
from . import DefaultTable
import sys
import struct
import array
post... | {
"repo_name": "google/material-design-icons",
"path": "update/venv/lib/python3.9/site-packages/fontTools/ttLib/tables/_p_o_s_t.py",
"copies": "3",
"size": "8760",
"license": "apache-2.0",
"hash": -7654716654882433000,
"line_mean": 31.4444444444,
"line_max": 96,
"alpha_frac": 0.6926940639,
"autogene... |
from fontTools.misc.py23 import bytechr, byteord, tobytes, tostr
from fontTools.misc import sstruct
from fontTools.misc.textTools import safeEval
from . import DefaultTable
SINGFormat = """
> # big endian
tableVersionMajor: H
tableVersionMinor: H
glyphletVersion: H
permissions: h
mainGID: H
unitsPerE... | {
"repo_name": "google/material-design-icons",
"path": "update/venv/lib/python3.9/site-packages/fontTools/ttLib/tables/S_I_N_G_.py",
"copies": "5",
"size": "2692",
"license": "apache-2.0",
"hash": -2263341435637270800,
"line_mean": 27.6382978723,
"line_max": 83,
"alpha_frac": 0.6831352155,
"autogene... |
from fontTools.misc.py23 import byteord
from fontTools.misc import sstruct
from fontTools.misc.fixedTools import floatToFixedToStr
from fontTools.misc.textTools import safeEval
# from itertools import *
from . import DefaultTable
from . import grUtils
from array import array
from functools import reduce
import struct, ... | {
"repo_name": "google/material-design-icons",
"path": "update/venv/lib/python3.9/site-packages/fontTools/ttLib/tables/S__i_l_f.py",
"copies": "5",
"size": "33326",
"license": "apache-2.0",
"hash": 2288808698555330600,
"line_mean": 36.6139954853,
"line_max": 126,
"alpha_frac": 0.5169237232,
"autogen... |
from fontTools.misc.py23 import byteord
from fontTools.misc import sstruct
from fontTools.misc.textTools import safeEval
from . import DefaultTable
import pdb
import struct
METAHeaderFormat = """
> # big endian
tableVersionMajor: H
tableVersionMinor: H
metaEntriesVersionMajor: H
metaEntriesVersionMinor:... | {
"repo_name": "google/material-design-icons",
"path": "update/venv/lib/python3.9/site-packages/fontTools/ttLib/tables/M_E_T_A_.py",
"copies": "5",
"size": "9393",
"license": "apache-2.0",
"hash": -5164312249272677000,
"line_mean": 29.8980263158,
"line_max": 136,
"alpha_frac": 0.6930693069,
"autogen... |
from fontTools.misc.py23 import byteord, tobytes
from fontTools.feaLib.error import FeatureLibError
from fontTools.feaLib.location import FeatureLibLocation
from fontTools.misc.encodingTools import getEncoding
from collections import OrderedDict
import itertools
SHIFT = " " * 4
__all__ = [
"Element",
"Feature... | {
"repo_name": "google/material-design-icons",
"path": "update/venv/lib/python3.9/site-packages/fontTools/feaLib/ast.py",
"copies": "3",
"size": "70109",
"license": "apache-2.0",
"hash": -8331864788724088000,
"line_mean": 33.553474618,
"line_max": 138,
"alpha_frac": 0.5802821321,
"autogenerated": fa... |
from fontTools.misc.py23 import byteord, tostr
import re
from bisect import bisect_right
try:
# use unicodedata backport compatible with python2:
# https://github.com/mikekap/unicodedata2
from unicodedata2 import *
except ImportError: # pragma: no cover
# fall back to built-in unicodedata (possibly o... | {
"repo_name": "google/material-design-icons",
"path": "update/venv/lib/python3.9/site-packages/fontTools/unicodedata/__init__.py",
"copies": "5",
"size": "8034",
"license": "apache-2.0",
"hash": -8646776370873531000,
"line_mean": 27.2887323944,
"line_max": 90,
"alpha_frac": 0.6294498382,
"autogener... |
from fontTools.misc.py23 import bytesjoin
from fontTools.misc import sstruct
from fontTools.misc.fixedTools import (
fixedToFloat as fi2fl,
floatToFixed as fl2fi,
floatToFixedToStr as fl2str,
strToFixedToFloat as str2fl,
)
from fontTools.ttLib import TTLibError
from . import DefaultTable
import struct
i... | {
"repo_name": "google/material-design-icons",
"path": "update/venv/lib/python3.9/site-packages/fontTools/ttLib/tables/_a_v_a_r.py",
"copies": "5",
"size": "3673",
"license": "apache-2.0",
"hash": 4310089192650833000,
"line_mean": 35.73,
"line_max": 86,
"alpha_frac": 0.5662945821,
"autogenerated": f... |
from fontTools.misc.py23 import bytesjoin
from fontTools.misc import sstruct
from fontTools.misc.fixedTools import (
fixedToFloat as fi2fl,
floatToFixed as fl2fi,
floatToFixedToStr as fl2str,
strToFixedToFloat as str2fl,
)
from fontTools.misc.textTools import safeEval
from fontTools.ttLib import TTLibError
from . i... | {
"repo_name": "google/material-design-icons",
"path": "update/venv/lib/python3.9/site-packages/fontTools/ttLib/tables/_t_r_a_k.py",
"copies": "5",
"size": "9352",
"license": "apache-2.0",
"hash": 5388250482087040000,
"line_mean": 28.6888888889,
"line_max": 88,
"alpha_frac": 0.6989948674,
"autogener... |
from fontTools.misc.py23 import bytesjoin
from fontTools.misc import sstruct
from . import DefaultTable
from fontTools.misc.textTools import safeEval
from .BitmapGlyphMetrics import BigGlyphMetrics, bigGlyphMetricsFormat, SmallGlyphMetrics, smallGlyphMetricsFormat
import struct
import itertools
from collections import ... | {
"repo_name": "google/material-design-icons",
"path": "update/venv/lib/python3.9/site-packages/fontTools/ttLib/tables/E_B_L_C_.py",
"copies": "5",
"size": "25177",
"license": "apache-2.0",
"hash": 1645807917849416200,
"line_mean": 39.2188498403,
"line_max": 139,
"alpha_frac": 0.7388489494,
"autogen... |
from fontTools.misc.py23 import bytesjoin
from fontTools.misc.textTools import safeEval
from . import DefaultTable
import struct
class table_V_O_R_G_(DefaultTable.DefaultTable):
""" This table is structured so that you can treat it like a dictionary keyed by glyph name.
ttFont['VORG'][<glyphName>] will return the ... | {
"repo_name": "google/material-design-icons",
"path": "update/venv/lib/python3.9/site-packages/fontTools/ttLib/tables/V_O_R_G_.py",
"copies": "5",
"size": "4751",
"license": "apache-2.0",
"hash": 6862505940170168000,
"line_mean": 33.4275362319,
"line_max": 126,
"alpha_frac": 0.7297411071,
"autogene... |
from fontTools.misc.py23 import bytesjoin
from fontTools.misc.textTools import safeEval, readHex
from fontTools.misc.encodingTools import getEncoding
from fontTools.ttLib import getSearchRange
from fontTools.unicode import Unicode
from . import DefaultTable
import sys
import struct
import array
import logging
log = l... | {
"repo_name": "google/material-design-icons",
"path": "update/venv/lib/python3.9/site-packages/fontTools/ttLib/tables/_c_m_a_p.py",
"copies": "5",
"size": "45373",
"license": "apache-2.0",
"hash": -3849395560030746000,
"line_mean": 33.8219493477,
"line_max": 191,
"alpha_frac": 0.6909836246,
"autoge... |
from fontTools.misc.py23 import bytesjoin
from . import DefaultTable
from fontTools.misc import sstruct
from fontTools.ttLib.tables.TupleVariation import \
compileTupleVariationStore, decompileTupleVariationStore, TupleVariation
# https://www.microsoft.com/typography/otspec/cvar.htm
# https://www.microsoft.com/ty... | {
"repo_name": "google/material-design-icons",
"path": "update/venv/lib/python3.9/site-packages/fontTools/ttLib/tables/_c_v_a_r.py",
"copies": "4",
"size": "3294",
"license": "apache-2.0",
"hash": 5658607622294245000,
"line_mean": 39.1707317073,
"line_max": 81,
"alpha_frac": 0.6326654523,
"autogener... |
from fontTools.misc.py23 import bytesjoin, strjoin
from fontTools.misc import sstruct
from fontTools.misc.textTools import readHex
from fontTools.ttLib import TTLibError
from . import DefaultTable
# Apple's documentation of 'meta':
# https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6meta.html
META... | {
"repo_name": "google/material-design-icons",
"path": "update/venv/lib/python3.9/site-packages/fontTools/ttLib/tables/_m_e_t_a.py",
"copies": "5",
"size": "3649",
"license": "apache-2.0",
"hash": 612219520178398200,
"line_mean": 34.7745098039,
"line_max": 81,
"alpha_frac": 0.5374075089,
"autogenera... |
from fontTools.misc.py23 import bytesjoin, strjoin, tobytes, tostr
from fontTools.misc import sstruct
from . import DefaultTable
try:
import xml.etree.cElementTree as ET
except ImportError:
import xml.etree.ElementTree as ET
from io import BytesIO
import struct
import logging
log = logging.getLogger(__name__)
__d... | {
"repo_name": "google/material-design-icons",
"path": "update/venv/lib/python3.9/site-packages/fontTools/ttLib/tables/S_V_G_.py",
"copies": "5",
"size": "12818",
"license": "apache-2.0",
"hash": 6800704520710339000,
"line_mean": 32.207253886,
"line_max": 195,
"alpha_frac": 0.6949602122,
"autogenera... |
from fontTools.misc.py23 import bytesjoin, strjoin, tobytes, tostr
from fontTools.misc.textTools import safeEval
from fontTools.misc import sstruct
from . import DefaultTable
import base64
DSIG_HeaderFormat = """
> # big endian
ulVersion: L
usNumSigs: H
usFlag: H
"""
# followed by an array of usN... | {
"repo_name": "google/material-design-icons",
"path": "update/venv/lib/python3.9/site-packages/fontTools/ttLib/tables/D_S_I_G_.py",
"copies": "5",
"size": "4603",
"license": "apache-2.0",
"hash": 4048551331028778500,
"line_mean": 34.4076923077,
"line_max": 111,
"alpha_frac": 0.7091027591,
"autogene... |
from fontTools.misc.py23 import bytesjoin, tobytes
from fontTools.misc.textTools import safeEval
from . import DefaultTable
import struct
# https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6ltag.html
class table__l_t_a_g(DefaultTable.DefaultTable):
def __init__(self, tag=None):
DefaultTable.Def... | {
"repo_name": "google/material-design-icons",
"path": "update/venv/lib/python3.9/site-packages/fontTools/ttLib/tables/_l_t_a_g.py",
"copies": "5",
"size": "1952",
"license": "apache-2.0",
"hash": 65653451998629304,
"line_mean": 29.5,
"line_max": 81,
"alpha_frac": 0.6854508197,
"autogenerated": fals... |
from fontTools.misc.py23 import bytesjoin, tobytes, tostr
from fontTools.misc.fixedTools import (
fixedToFloat as fi2fl,
floatToFixed as fl2fi,
floatToFixedToStr as fl2str,
strToFixedToFloat as str2fl,
ensureVersionIsLong as fi2ve,
versionToFixed as ve2fi,
)
from fontTools.misc.textTools import pad, safeEval
from... | {
"repo_name": "google/material-design-icons",
"path": "update/venv/lib/python3.9/site-packages/fontTools/ttLib/tables/otConverters.py",
"copies": "3",
"size": "58471",
"license": "apache-2.0",
"hash": -2829462744219346400,
"line_mean": 31.3580520199,
"line_max": 115,
"alpha_frac": 0.7093430932,
"au... |
from fontTools.misc.py23 import bytesjoin, tostr
from io import BytesIO
import struct
from fontTools.misc import sstruct
from collections import OrderedDict
from collections.abc import MutableMapping
class ResourceError(Exception):
pass
class ResourceReader(MutableMapping):
"""Reader for Mac OS resource forks.
... | {
"repo_name": "google/material-design-icons",
"path": "update/venv/lib/python3.9/site-packages/fontTools/misc/macRes.py",
"copies": "5",
"size": "7408",
"license": "apache-2.0",
"hash": -6409355885275127000,
"line_mean": 27.6023166023,
"line_max": 77,
"alpha_frac": 0.7020788337,
"autogenerated": fa... |
from fontTools.misc.py23 import *
from AppKit import *
import re
import weakref
from vanilla import *
from vanilla.dialogs import getFile
from defconAppKit.windows.baseWindow import BaseWindowController
from mojo.roboFont import version as RoboFontVersion
from mojo.events import addObserver, removeObserver
from mojo.d... | {
"repo_name": "typemytype/GlyphConstruction",
"path": "GlyphConstruction.roboFontExt/lib/glyphConstructionController.py",
"copies": "3",
"size": "31785",
"license": "mit",
"hash": 5952169880683015000,
"line_mean": 34.9966024915,
"line_max": 180,
"alpha_frac": 0.6057574328,
"autogenerated": false,
... |
from fontTools.misc.py23 import *
from fontTools.misc import sstruct
from fontTools.misc.textTools import safeEval
from ._h_e_a_d import mac_epoch_diff
from . import DefaultTable
import time
import calendar
FFTMFormat = """
> # big endian
version: I
FFTimeStamp: Q
sourceCreated: Q
sourceModified: ... | {
"repo_name": "googlei18n/fontuley",
"path": "src/third_party/fontTools/Lib/fontTools/ttLib/tables/F_F_T_M_.py",
"copies": "7",
"size": "1408",
"license": "apache-2.0",
"hash": 5668241076642348000,
"line_mean": 29.6304347826,
"line_max": 88,
"alpha_frac": 0.6803977273,
"autogenerated": false,
"ra... |
from fontTools.misc.py23 import *
import os
import time
from xml.etree import ElementTree
# ----------------------
# Very Simple XML Writer
# ----------------------
class XMLWriter(object):
def __init__(self):
self._root = None
self._elements = []
def simpletag(self, tag, **kwargs):
... | {
"repo_name": "typesupply/woffTools",
"path": "Lib/woffTools/tools/support.py",
"copies": "1",
"size": "9396",
"license": "mit",
"hash": 8245489622908094000,
"line_mean": 21.5323741007,
"line_max": 140,
"alpha_frac": 0.6332481907,
"autogenerated": false,
"ratio": 2.845548152634767,
"config_test... |
from fontTools.misc.py23 import *
try:
set
except NameError:
from sets import Set as set
class FeatureTableWriter(object):
"""
A very simple feature file syntax table writer.
"""
def __init__(self, name, indentation=" "):
self._name = name
self._lineSep = "\n"
sel... | {
"repo_name": "moyogo/ufo2fdk",
"path": "Lib/ufo2fdk/featureTableWriter.py",
"copies": "1",
"size": "2999",
"license": "mit",
"hash": -3631144616018957300,
"line_mean": 27.2924528302,
"line_max": 66,
"alpha_frac": 0.5805268423,
"autogenerated": false,
"ratio": 3.894805194805195,
"config_test": ... |
from fontTools.misc.py23 import Tag, bytechr, byteord, bytesjoin
from io import BytesIO
import sys
import array
import struct
from collections import OrderedDict
from fontTools.misc import sstruct
from fontTools.misc.arrayTools import calcIntBounds
from fontTools.misc.textTools import pad
from fontTools.ttLib import (T... | {
"repo_name": "google/material-design-icons",
"path": "update/venv/lib/python3.9/site-packages/fontTools/ttLib/woff2.py",
"copies": "5",
"size": "49575",
"license": "apache-2.0",
"hash": -8221573259366511000,
"line_mean": 31.3385518591,
"line_max": 111,
"alpha_frac": 0.6975289965,
"autogenerated": ... |
from fontTools.misc.py23 import Tag, bytesjoin
from .DefaultTable import DefaultTable
import sys
import array
import struct
import logging
log = logging.getLogger(__name__)
class OverflowErrorRecord(object):
def __init__(self, overflowTuple):
self.tableType = overflowTuple[0]
self.LookupListIndex = overflowTuple... | {
"repo_name": "google/material-design-icons",
"path": "update/venv/lib/python3.9/site-packages/fontTools/ttLib/tables/otBase.py",
"copies": "2",
"size": "30335",
"license": "apache-2.0",
"hash": 9176469849200878000,
"line_mean": 28.4800777454,
"line_max": 164,
"alpha_frac": 0.6912147684,
"autogener... |
from fontTools.misc.py23 import Tag, bytesjoin
from fontTools.misc import sstruct
from fontTools.misc.fixedTools import (
fixedToFloat as fi2fl,
floatToFixed as fl2fi,
floatToFixedToStr as fl2str,
strToFixedToFloat as str2fl,
)
from fontTools.misc.textTools import safeEval
from fontTools.ttLib import TT... | {
"repo_name": "google/material-design-icons",
"path": "update/venv/lib/python3.9/site-packages/fontTools/ttLib/tables/_f_v_a_r.py",
"copies": "5",
"size": "8289",
"license": "apache-2.0",
"hash": 5698246678535751000,
"line_mean": 35.3552631579,
"line_max": 84,
"alpha_frac": 0.5732899023,
"autogener... |
from fontTools.misc.py23 import Tag, bytesjoin, strjoin
try:
import xattr
except ImportError:
xattr = None
def _reverseString(s):
s = list(s)
s.reverse()
return strjoin(s)
def getMacCreatorAndType(path):
"""Returns file creator and file type codes for a path.
Args:
path (str): A file path.
Returns:
A ... | {
"repo_name": "google/material-design-icons",
"path": "update/venv/lib/python3.9/site-packages/fontTools/misc/macCreatorType.py",
"copies": "5",
"size": "1364",
"license": "apache-2.0",
"hash": 5437882595333263000,
"line_mean": 24.2592592593,
"line_max": 66,
"alpha_frac": 0.7170087977,
"autogenerat... |
from fontTools.misc.py23 import Tag
from fontTools.ttLib import getClassTag
class DefaultTable(object):
dependencies = []
def __init__(self, tag=None):
if tag is None:
tag = getClassTag(self.__class__)
self.tableTag = Tag(tag)
def decompile(self, data, ttFont):
self.data = data
def compile(self, ttFon... | {
"repo_name": "google/material-design-icons",
"path": "update/venv/lib/python3.9/site-packages/fontTools/ttLib/tables/DefaultTable.py",
"copies": "5",
"size": "1277",
"license": "apache-2.0",
"hash": -5388092236058260000,
"line_mean": 25.6041666667,
"line_max": 77,
"alpha_frac": 0.6906812843,
"auto... |
from fontTools.misc.py23 import Tag, tostr
from fontTools.misc import sstruct
from fontTools.misc.textTools import binary2num, safeEval
from fontTools.feaLib.error import FeatureLibError
from fontTools.feaLib.lookupDebugInfo import (
LookupDebugInfo,
LOOKUP_DEBUG_INFO_KEY,
LOOKUP_DEBUG_ENV_VAR,
)
from fontT... | {
"repo_name": "google/material-design-icons",
"path": "update/venv/lib/python3.9/site-packages/fontTools/feaLib/builder.py",
"copies": "4",
"size": "59498",
"license": "apache-2.0",
"hash": 5363078476778788000,
"line_mean": 39.1470985155,
"line_max": 88,
"alpha_frac": 0.5605566574,
"autogenerated":... |
from fontTools.misc.py23 import tobytes, tostr
from fontTools.misc import sstruct
from fontTools.misc.textTools import safeEval
from . import DefaultTable
GMAPFormat = """
> # big endian
tableVersionMajor: H
tableVersionMinor: H
flags: H
recordsCount: H
recordsOffset: H
fontNameLength: H
"""
# psFont... | {
"repo_name": "google/material-design-icons",
"path": "update/venv/lib/python3.9/site-packages/fontTools/ttLib/tables/G_M_A_P_.py",
"copies": "5",
"size": "3755",
"license": "apache-2.0",
"hash": 1342476547796580900,
"line_mean": 28.5669291339,
"line_max": 174,
"alpha_frac": 0.6886817577,
"autogene... |
from fontTools.misc.py23 import tostr
from fontTools.pens.transformPen import TransformPen
from fontTools.misc import etree
from .parser import parse_path
from .shapes import PathBuilder
__all__ = [tostr(s) for s in ("SVGPath", "parse_path")]
class SVGPath(object):
""" Parse SVG ``path`` elements from a file o... | {
"repo_name": "google/material-design-icons",
"path": "update/venv/lib/python3.9/site-packages/fontTools/svgLib/path/__init__.py",
"copies": "5",
"size": "1951",
"license": "apache-2.0",
"hash": -7407992158775994000,
"line_mean": 30.4677419355,
"line_max": 72,
"alpha_frac": 0.6186570989,
"autogener... |
from fontTools.misc.py23 import unichr
import vanilla
from AppKit import NSSegmentStyleSmallSquare
from defconAppKit.windows.baseWindow import BaseWindowController
from mojo.roboFont import OpenWindow
from mojo.UI import UpdateCurrentGlyphView
from ramsayStData import RamsayStData
class AddGlyphNameSheet(object):... | {
"repo_name": "typemytype/ramsayStreetRoboFontExtension",
"path": "RamsaySt.roboFontExt/lib/ramsayStSettings.py",
"copies": "1",
"size": "6606",
"license": "mit",
"hash": -7742487052892665000,
"line_mean": 32.7040816327,
"line_max": 147,
"alpha_frac": 0.5976385104,
"autogenerated": false,
"ratio"... |
from fontTools.misc.roundTools import noRound, otRound
from fontTools.ttLib.tables import otTables as ot
from fontTools.varLib.models import supportScalar
from fontTools.varLib.builder import (buildVarRegionList, buildVarStore,
buildVarRegion, buildVarData)
from functools import partial
from collections impor... | {
"repo_name": "google/material-design-icons",
"path": "update/venv/lib/python3.9/site-packages/fontTools/varLib/varStore.py",
"copies": "3",
"size": "16627",
"license": "apache-2.0",
"hash": -8710384574531715000,
"line_mean": 27.1336717428,
"line_max": 104,
"alpha_frac": 0.7075239069,
"autogenerate... |
from fontTools.misc.roundTools import otRound
from fontTools import ttLib
from fontTools.misc.textTools import safeEval
from . import DefaultTable
import sys
import struct
import array
import logging
log = logging.getLogger(__name__)
class table__h_m_t_x(DefaultTable.DefaultTable):
headerTag = 'hhea'
advanceName... | {
"repo_name": "google/material-design-icons",
"path": "update/venv/lib/python3.9/site-packages/fontTools/ttLib/tables/_h_m_t_x.py",
"copies": "5",
"size": "4618",
"license": "apache-2.0",
"hash": -8706608085830748000,
"line_mean": 32.4637681159,
"line_max": 72,
"alpha_frac": 0.708315288,
"autogener... |
from fontTools.misc.roundTools import otRound
from fontTools.misc.transform import Transform
from fontTools.pens.filterPen import FilterPen, FilterPointPen
__all__ = ["RoundingPen", "RoundingPointPen"]
class RoundingPen(FilterPen):
"""
Filter pen that rounds point coordinates and component XY offsets to int... | {
"repo_name": "google/material-design-icons",
"path": "update/venv/lib/python3.9/site-packages/fontTools/pens/roundingPen.py",
"copies": "5",
"size": "3803",
"license": "apache-2.0",
"hash": 7474128881076738000,
"line_mean": 32.9553571429,
"line_max": 87,
"alpha_frac": 0.5308966605,
"autogenerated"... |
from fontTools.misc.textTools import safeEval
from . import DefaultTable
import struct
import array
# XXX I've lowered the strictness, to make sure Apple's own Chicago
# XXX gets through. They're looking into it, I hope to raise the standards
# XXX back to normal eventually.
class table_L_T_S_H_(DefaultTable.DefaultT... | {
"repo_name": "google/material-design-icons",
"path": "update/venv/lib/python3.9/site-packages/fontTools/ttLib/tables/L_T_S_H_.py",
"copies": "5",
"size": "1613",
"license": "apache-2.0",
"hash": 1923461349534792400,
"line_mean": 32.6041666667,
"line_max": 75,
"alpha_frac": 0.6924984501,
"autogener... |
from fontTools.misc.textTools import safeEval
from . import DefaultTable
import struct
GASP_SYMMETRIC_GRIDFIT = 0x0004
GASP_SYMMETRIC_SMOOTHING = 0x0008
GASP_DOGRAY = 0x0002
GASP_GRIDFIT = 0x0001
class table__g_a_s_p(DefaultTable.DefaultTable):
def decompile(self, data, ttFont):
self.version, numRanges = struct.... | {
"repo_name": "google/material-design-icons",
"path": "update/venv/lib/python3.9/site-packages/fontTools/ttLib/tables/_g_a_s_p.py",
"copies": "5",
"size": "1585",
"license": "apache-2.0",
"hash": 5047191961928382000,
"line_mean": 31.3469387755,
"line_max": 88,
"alpha_frac": 0.7059936909,
"autogener... |
from fontTools.misc.textTools import safeEval
from . import DefaultTable
import sys
import array
class table__c_v_t(DefaultTable.DefaultTable):
def decompile(self, data, ttFont):
values = array.array("h")
values.frombytes(data)
if sys.byteorder != "big": values.byteswap()
self.values = values
def compile(s... | {
"repo_name": "google/material-design-icons",
"path": "update/venv/lib/python3.9/site-packages/fontTools/ttLib/tables/_c_v_t.py",
"copies": "5",
"size": "1145",
"license": "apache-2.0",
"hash": 2425795897745965000,
"line_mean": 24.4444444444,
"line_max": 49,
"alpha_frac": 0.6759825328,
"autogenerat... |
from fontTools.misc.transform import Transform
from defcon.objects.base import BaseObject
_defaultTransformation = (1, 0, 0, 1, 0, 0)
class Component(BaseObject):
"""
This object represents a reference to another glyph.
**This object posts the following notifications:**
========================== ... | {
"repo_name": "typemytype/defcon",
"path": "Lib/defcon/objects/component.py",
"copies": "1",
"size": "5191",
"license": "mit",
"hash": -6486660219302099000,
"line_mean": 31.0432098765,
"line_max": 257,
"alpha_frac": 0.6077827008,
"autogenerated": false,
"ratio": 4.37689713322091,
"config_test":... |
from fontTools.misc.transform import Transform
from ufo2ft.filters import BaseFilter
import logging
logger = logging.getLogger(__name__)
class FlattenComponentsFilter(BaseFilter):
def __call__(self, font, glyphSet=None):
if super(FlattenComponentsFilter, self).__call__(font, glyphSet):
modi... | {
"repo_name": "jamesgk/ufo2ft",
"path": "Lib/ufo2ft/filters/flattenComponents.py",
"copies": "1",
"size": "1836",
"license": "mit",
"hash": 1626815989282869200,
"line_mean": 35.72,
"line_max": 78,
"alpha_frac": 0.6574074074,
"autogenerated": false,
"ratio": 4.601503759398496,
"config_test": fal... |
from fontTools.misc.transform import Transform
from ufo2ft.filters import BaseFilter
import logging
logger = logging.getLogger(__name__)
class FlattenComponentsFilter(BaseFilter):
def __call__(self, font, glyphSet=None):
if super(FlattenComponentsFilter, self).__call__(font, glyphSet):
mod... | {
"repo_name": "jamesgk/ufo2fdk",
"path": "Lib/ufo2ft/filters/flattenComponents.py",
"copies": "2",
"size": "1865",
"license": "mit",
"hash": 736537670217299000,
"line_mean": 34.8653846154,
"line_max": 78,
"alpha_frac": 0.6471849866,
"autogenerated": false,
"ratio": 4.6625,
"config_test": false,... |
from fontTools.pens.basePen import AbstractPen, BasePen
from robofab.misc.bezierTools import splitLine, splitCubic
from sets import Set
class MarginPen(BasePen):
"""
Pen to calculate the margins at a given value.
When isHorizontal is True, the margins at <value> are horizontal.
When isHorizontal... | {
"repo_name": "moyogo/robofab",
"path": "Lib/robofab/pens/marginPen.py",
"copies": "9",
"size": "4833",
"license": "bsd-3-clause",
"hash": 5928203480065633000,
"line_mean": 29.1806451613,
"line_max": 93,
"alpha_frac": 0.6741154562,
"autogenerated": false,
"ratio": 3.1423927178153446,
"config_te... |
from fontTools.pens.basePen import AbstractPen
from fontTools.pens.pointPen import AbstractPointPen
from fontTools.pens.recordingPen import RecordingPen
class _PassThruComponentsMixin(object):
def addComponent(self, glyphName, transformation, **kwargs):
self._outPen.addComponent(glyphName, transformation... | {
"repo_name": "google/material-design-icons",
"path": "update/venv/lib/python3.9/site-packages/fontTools/pens/filterPen.py",
"copies": "5",
"size": "4732",
"license": "apache-2.0",
"hash": -7731379216678571000,
"line_mean": 28.9493670886,
"line_max": 80,
"alpha_frac": 0.6077768385,
"autogenerated":... |
from fontTools.pens.basePen import AbstractPen
from ufoLib.pointPen import AbstractPointPen
__all__ = ["AbstractPointPen", "BasePointToSegmentPen", "PrintingPointPen",
"PrintingSegmentPen", "SegmentPrintingPointPen"]
class BasePointToSegmentPen(AbstractPointPen):
"""Base class for retrieving the outline... | {
"repo_name": "adrientetar/robofab",
"path": "Lib/robofab/pens/pointPen.py",
"copies": "1",
"size": "5374",
"license": "bsd-3-clause",
"hash": -8305641667661883000,
"line_mean": 30.2441860465,
"line_max": 94,
"alpha_frac": 0.6924078898,
"autogenerated": false,
"ratio": 3.208358208955224,
"confi... |
from fontTools.pens.basePen import AbstractPen
__all__ = ["TransformPen"]
class TransformPen(AbstractPen):
"""Pen that transforms all coordinates using a Affine transformation,
and passes them to another pen.
"""
def __init__(self, outPen, transformation):
"""The 'outPen' argument is another pen object. It ... | {
"repo_name": "shadowmint/nwidget",
"path": "lib/fonttools-2.3/Lib/fontTools/pens/transformPen.py",
"copies": "2",
"size": "1812",
"license": "apache-2.0",
"hash": -1308408506856271600,
"line_mean": 27.7619047619,
"line_max": 70,
"alpha_frac": 0.7168874172,
"autogenerated": false,
"ratio": 3.3065... |
from fontTools.pens.basePen import BasePen
from .flatten import InputContour, OutputContour
from pyClipper import PolyClipper # XXX this isn't the real thing
"""
General Suggestions:
- Contours should only be sent here if they actually overlap.
This can be checked easily using contour bounds.
- Only perform operati... | {
"repo_name": "adrientetar/defcon",
"path": "Lib/defcon/tools/booleanOperations/__init__.py",
"copies": "1",
"size": "2811",
"license": "mit",
"hash": -5434237711397960000,
"line_mean": 40.9552238806,
"line_max": 150,
"alpha_frac": 0.6623977232,
"autogenerated": false,
"ratio": 4.385335413416537,... |
from fontTools.pens.basePen import BasePen
from flatten import InputContour, OutputContour
from pyClipper import PolyClipper # XXX this isn't the real thing
"""
General Suggestions:
- Contours should only be sent here if they actually overlap.
This can be checked easily using contour bounds.
- Only perform operatio... | {
"repo_name": "metapolator/mutatormathtools",
"path": "python_modules/lib/python/defcon/tools/booleanOperations/__init__.py",
"copies": "1",
"size": "2810",
"license": "apache-2.0",
"hash": 5444176425720641000,
"line_mean": 40.9402985075,
"line_max": 150,
"alpha_frac": 0.662633452,
"autogenerated":... |
from fontTools.pens.basePen import BasePen
from flatten import InputContour, OutputContour
import pyClipper
"""
General Suggestions:
- Contours should only be sent here if they actually overlap.
This can be checked easily using contour bounds.
- Only perform operations on closed contours.
- contours must have an on... | {
"repo_name": "moyogo/mutatorscale",
"path": "lib/mutatorScale/booleanOperations/booleanOperationManager.py",
"copies": "4",
"size": "3938",
"license": "mit",
"hash": -7595882248059536000,
"line_mean": 43.7613636364,
"line_max": 131,
"alpha_frac": 0.6635347892,
"autogenerated": false,
"ratio": 4.... |
from fontTools.pens.basePen import BasePen
from fontTools.misc.arrayTools import updateBounds, pointInRect, unionRect
from fontTools.misc.bezierTools import calcCubicBounds, calcQuadraticBounds
__all__ = ["BoundsPen", "ControlBoundsPen"]
class ControlBoundsPen(BasePen):
"""Pen to calculate the "control bounds" of... | {
"repo_name": "shadowmint/nwidget",
"path": "lib/fonttools-2.3/Lib/fontTools/pens/boundsPen.py",
"copies": "2",
"size": "2576",
"license": "apache-2.0",
"hash": 6678536003582683000,
"line_mean": 26.6989247312,
"line_max": 75,
"alpha_frac": 0.700310559,
"autogenerated": false,
"ratio": 2.981481481... |
from fontTools.pens.basePen import BasePen
from functools import partial
from itertools import count
import sympy as sp
import sys
n = 3 # Max Bezier degree; 3 for cubic, 2 for quadratic
t, x, y = sp.symbols('t x y', real=True)
c = sp.symbols('c', real=False) # Complex representation instead of x/y
X = tuple(sp.symb... | {
"repo_name": "google/material-design-icons",
"path": "update/venv/lib/python3.9/site-packages/fontTools/misc/symfont.py",
"copies": "5",
"size": "5283",
"license": "apache-2.0",
"hash": -7949379261195984000,
"line_mean": 26.515625,
"line_max": 77,
"alpha_frac": 0.6520916146,
"autogenerated": false... |
from fontTools.pens.basePen import BasePen
from reportlab.graphics.shapes import Path
__all__ = ["ReportLabPen"]
class ReportLabPen(BasePen):
"""A pen for drawing onto a reportlab.graphics.shapes.Path object."""
def __init__(self, glyphSet, path=None):
BasePen.__init__(self, glyphSet)
if path is None:
pa... | {
"repo_name": "google/material-design-icons",
"path": "update/venv/lib/python3.9/site-packages/fontTools/pens/reportLabPen.py",
"copies": "5",
"size": "1779",
"license": "apache-2.0",
"hash": -3562843458421698000,
"line_mean": 23.3698630137,
"line_max": 86,
"alpha_frac": 0.6756604834,
"autogenerate... |
from fontTools.pens.basePen import BasePen
from robofab.misc.arrayTools import updateBounds, pointInRect, unionRect
from robofab.misc.bezierTools import calcCubicBounds, calcQuadraticBounds
__all__ = ["BoundsPen", "ControlBoundsPen"]
class ControlBoundsPen(BasePen):
"""Pen to calculate the "control bounds" of a s... | {
"repo_name": "anthrotype/robofab",
"path": "Lib/robofab/pens/boundsPen.py",
"copies": "9",
"size": "2689",
"license": "bsd-3-clause",
"hash": -3050847589876032000,
"line_mean": 27.3052631579,
"line_max": 82,
"alpha_frac": 0.7147638527,
"autogenerated": false,
"ratio": 3.1122685185185186,
"conf... |
from fontTools.pens.basePen import BasePen
from robofab.objects.objectsRF import RFont, RGlyph
from drawBot import *
class DrawBotPen(BasePen):
"""
A pen that draws a glyph into a drawbot.
I don't think this can deal with components or anything so be careful.
"""
def _moveTo(self, (x, y)):
... | {
"repo_name": "davelab6/drawbotlab",
"path": "glyph.py",
"copies": "1",
"size": "3424",
"license": "mit",
"hash": -4122746093864195600,
"line_mean": 31.619047619,
"line_max": 93,
"alpha_frac": 0.629088785,
"autogenerated": false,
"ratio": 3.515400410677618,
"config_test": false,
"has_no_keywo... |
from fontTools.pens.basePen import BasePen
from robofab.pens.pointPen import AbstractPointPen
def calcArea(points):
l = len(points)
area = 0
for i in xrange(l):
x1, y1 = points[i]
x2, y2 = points[(i+1)%l]
area += (x1*y2)-(x2*y1)
return area / 2
class FilterPointPen(AbstractPoin... | {
"repo_name": "loicsander/Robofont-scripts",
"path": "PenBallWizard/PenBallWizard.roboFontExt/lib/penBallWizard/objects/penUtils.py",
"copies": "2",
"size": "2292",
"license": "mit",
"hash": -7805557958314122000,
"line_mean": 23.6451612903,
"line_max": 87,
"alpha_frac": 0.6042757417,
"autogenerated... |
from fontTools.pens.basePen import BasePen
from robofab.pens.pointPen import AbstractPointPen
def calcArea(points):
l = len(points)
area = 0
for i in xrange(l):
x1, y1 = points[i]
x2, y2 = points[(i+1)%l]
area += (x1*y2)-(x2*y1)
return area / 2
def overlap((x1, y1), (x2, y2),... | {
"repo_name": "loicsander/RobofabPens",
"path": "cleanPointPen.py",
"copies": "1",
"size": "2967",
"license": "mit",
"hash": -2075023807430832000,
"line_mean": 32.3483146067,
"line_max": 240,
"alpha_frac": 0.6204920795,
"autogenerated": false,
"ratio": 3.909090909090909,
"config_test": false,
... |
from fontTools.pens.basePen import BasePen
def roundInt(v):
return int(round(v))
def roundIntPoint(xxx_todo_changeme):
(x, y) = xxx_todo_changeme
return roundInt(x), roundInt(y)
class RelativeCoordinatePen(BasePen):
def __init__(self, glyphSet):
BasePen.__init__(self, glyphSet)
self... | {
"repo_name": "adrientetar/ufo2fdk",
"path": "Lib/ufo2fdk/pens/__init__.py",
"copies": "1",
"size": "1862",
"license": "mit",
"hash": 7152472041458540000,
"line_mean": 27.6615384615,
"line_max": 64,
"alpha_frac": 0.6068743287,
"autogenerated": false,
"ratio": 3.807770961145194,
"config_test": f... |
from fontTools.pens.basePen import BasePen
def roundInt(v):
return int(round(v))
def roundIntPoint((x, y)):
return roundInt(x), roundInt(y)
class RelativeCoordinatePen(BasePen):
def __init__(self, glyphSet):
BasePen.__init__(self, glyphSet)
self._lastX = None
self._lastY = None
... | {
"repo_name": "anthrotype/ufo2fdk",
"path": "Lib/ufo2fdk/pens/__init__.py",
"copies": "3",
"size": "1821",
"license": "mit",
"hash": -9026704940833186000,
"line_mean": 27.453125,
"line_max": 64,
"alpha_frac": 0.6040637013,
"autogenerated": false,
"ratio": 3.8417721518987342,
"config_test": fals... |
from fontTools.pens.basePen import BasePen
from Quartz.CoreGraphics import CGPathCreateMutable, CGPathMoveToPoint
from Quartz.CoreGraphics import CGPathAddLineToPoint, CGPathAddCurveToPoint
from Quartz.CoreGraphics import CGPathAddQuadCurveToPoint, CGPathCloseSubpath
__all__ = ["QuartzPen"]
class QuartzPen(BasePe... | {
"repo_name": "google/material-design-icons",
"path": "update/venv/lib/python3.9/site-packages/fontTools/pens/quartzPen.py",
"copies": "5",
"size": "1175",
"license": "apache-2.0",
"hash": -9118575459885220000,
"line_mean": 25.1111111111,
"line_max": 77,
"alpha_frac": 0.7072340426,
"autogenerated":... |
from fontTools.pens.basePen import BasePen
class ReportLabPen(BasePen):
"""A pen for drawing onto a reportlab.graphics.shapes.Path object."""
def __init__(self, glyphSet, path=None):
BasePen.__init__(self, glyphSet)
if path is None:
from reportlab.graphics.shapes import Path
path = Path()
self.path = ... | {
"repo_name": "shadowmint/nwidget",
"path": "lib/fonttools-2.3/Lib/fontTools/pens/reportLabPen.py",
"copies": "2",
"size": "1747",
"license": "apache-2.0",
"hash": -1895581856898464800,
"line_mean": 25.4696969697,
"line_max": 85,
"alpha_frac": 0.6914710933,
"autogenerated": false,
"ratio": 2.7127... |
from fontTools.pens.basePen import BasePen
def pointToString(pt):
return " ".join([str(i) for i in pt])
class SVGPathPen(BasePen):
def __init__(self, glyphSet):
BasePen.__init__(self, glyphSet)
self._commands = []
self._lastCommand = None
self._lastX = None
self._las... | {
"repo_name": "google/material-design-icons",
"path": "update/venv/lib/python3.9/site-packages/fontTools/pens/svgPathPen.py",
"copies": "5",
"size": "4373",
"license": "apache-2.0",
"hash": -6243966834895561000,
"line_mean": 23.8465909091,
"line_max": 53,
"alpha_frac": 0.4440887263,
"autogenerated"... |
from fontTools.pens.basePen import BasePen
def roundInt(v):
return int(round(v))
def roundIntPoint(xy):
x, y = xy
return roundInt(x), roundInt(y)
class RelativeCoordinatePen(BasePen):
def __init__(self, glyphSet):
BasePen.__init__(self, glyphSet)
self._lastX = None
self._l... | {
"repo_name": "typesupply/ufo2fdk",
"path": "Lib/ufo2fdk/pens/__init__.py",
"copies": "3",
"size": "1824",
"license": "mit",
"hash": 3833396243699909000,
"line_mean": 26.2388059701,
"line_max": 64,
"alpha_frac": 0.6052631579,
"autogenerated": false,
"ratio": 3.8238993710691824,
"config_test": f... |
from fontTools.pens.basePen import BasePen
from robofab.objects.objectsRF import RFont, RGlyph
from drawBot import *
class DrawBotPen(BasePen):
"""
A pen that draws a glyph into a drawbot.
I don't think this can deal with components or anything so be careful.
"""
def _moveTo(self, coordina... | {
"repo_name": "djrrb/drawbotlab",
"path": "glyph.py",
"copies": "1",
"size": "4496",
"license": "mit",
"hash": -1362919271372811000,
"line_mean": 31.3037037037,
"line_max": 93,
"alpha_frac": 0.6212188612,
"autogenerated": false,
"ratio": 3.790893760539629,
"config_test": false,
"has_no_keywor... |
from fontTools.pens.boundsPen import ControlBoundsPen, BoundsPen
from fontTools.misc.arrayTools import unionRect
from defcon.pens.clockwiseTestPointPen import ClockwiseTestPointPen
# -----
# Glyph
# -----
def glyphBoundsRepresentationFactory(glyph):
bounds = None
for group in (glyph, glyph.components):
... | {
"repo_name": "metapolator/mutatormathtools",
"path": "python_modules/lib/python/defcon/tools/representations.py",
"copies": "2",
"size": "1376",
"license": "apache-2.0",
"hash": 3387940153627618300,
"line_mean": 24.4814814815,
"line_max": 67,
"alpha_frac": 0.6264534884,
"autogenerated": false,
"... |
from fontTools.pens.cocoaPen import CocoaPen
from robofab.interface.all.dialogs import GetFile
from robofab.world import OpenFont
import datetime
now = datetime.datetime.now().strftime('%d %B %Y - %H:%M')
def _drawGlyph(glyph):
pen = CocoaPen(glyph.getParent())
glyph.draw(pen)
drawPath(pen.path)
def p... | {
"repo_name": "loicsander/Font2PDF",
"path": "DrawBot/DB-charset.py",
"copies": "1",
"size": "5316",
"license": "mit",
"hash": -5128658040623836000,
"line_mean": 27.422459893,
"line_max": 147,
"alpha_frac": 0.6392547986,
"autogenerated": false,
"ratio": 3.2089371980676327,
"config_test": false,... |
from fontTools.pens.cocoaPen import CocoaPen
# Some configuration
page_format = 'A4' # See http://drawbot.readthedocs.org/content/canvas/pages.html#size for other size-values
my_selection = CurrentFont() # May also be CurrentFont.selection or else
pdf_filepath = '~/Desktop/AllMyGlyphs.pdf'
# Init
font = CurrentFont()... | {
"repo_name": "AlphabetType/DrawBot-Scripts",
"path": "createGlyphsPDF.py",
"copies": "1",
"size": "4942",
"license": "mit",
"hash": -2610880716260796400,
"line_mean": 28.9515151515,
"line_max": 154,
"alpha_frac": 0.6011736139,
"autogenerated": false,
"ratio": 3.316778523489933,
"config_test": ... |
from fontTools.pens.filterPen import FilterPen, FilterPointPen
__all__ = ["TransformPen"]
class TransformPen(FilterPen):
"""Pen that transforms all coordinates using a Affine transformation,
and passes them to another pen.
"""
def __init__(self, outPen, transformation):
"""The 'outPen' argument is another p... | {
"repo_name": "google/material-design-icons",
"path": "update/venv/lib/python3.9/site-packages/fontTools/pens/transformPen.py",
"copies": "3",
"size": "3560",
"license": "apache-2.0",
"hash": -158193839039064800,
"line_mean": 31.962962963,
"line_max": 85,
"alpha_frac": 0.708988764,
"autogenerated":... |
from fontTools.pens.pointPen import AbstractPointPen
from warnings import warn
class TransformPointPen(AbstractPointPen):
"""PointPen that transforms all coordinates, and passes them to another
PointPen. It also transforms the transformation given to addComponent().
"""
def __init__(self, outPen, tr... | {
"repo_name": "moyogo/defcon",
"path": "Lib/defcon/pens/transformPointPen.py",
"copies": "1",
"size": "1483",
"license": "mit",
"hash": -1326221989344743400,
"line_mean": 40.1944444444,
"line_max": 143,
"alpha_frac": 0.7019554956,
"autogenerated": false,
"ratio": 4.768488745980707,
"config_test... |
from fontTools.pens.pointPen import AbstractPointPen
class GlyphObjectPointPen(AbstractPointPen):
def __init__(self, glyph):
self._glyph = glyph
self._contour = None
self.skipConflictingIdentifiers = False
def beginPath(self, identifier=None, **kwargs):
self._contour = self._g... | {
"repo_name": "moyogo/defcon",
"path": "Lib/defcon/pens/glyphObjectPointPen.py",
"copies": "2",
"size": "3694",
"license": "mit",
"hash": -302152606674942400,
"line_mean": 44.0487804878,
"line_max": 112,
"alpha_frac": 0.6616134272,
"autogenerated": false,
"ratio": 4.816166883963494,
"config_tes... |
from fontTools.pens.pointPen import AbstractPointPen
class TransformPointPen(AbstractPointPen):
"""PointPen that transforms all coordinates, and passes them to another
PointPen. It also transforms the transformation given to addComponent().
"""
def __init__(self, outPen, transformation):
if not hasattr(transfo... | {
"repo_name": "typesupply/defcon",
"path": "Lib/defcon/pens/transformPointPen.py",
"copies": "1",
"size": "1067",
"license": "mit",
"hash": -595172286620103200,
"line_mean": 34.5666666667,
"line_max": 77,
"alpha_frac": 0.771321462,
"autogenerated": false,
"ratio": 3.838129496402878,
"config_tes... |
from fontTools.t1Lib import T1Font, T1Error
from fontTools.agl import AGL2UV
from fontTools.misc.psLib import PSInterpreter
from fontTools.misc.transform import Transform
from extractor.tools import RelaxedInfo
# specification: http://partners.adobe.com/public/developer/en/font/T1_SPEC.PDF
# ----------------
# Public... | {
"repo_name": "typesupply/extractor",
"path": "Lib/extractor/formats/type1.py",
"copies": "3",
"size": "5607",
"license": "mit",
"hash": 6081547244913846000,
"line_mean": 33.1890243902,
"line_max": 114,
"alpha_frac": 0.6688068486,
"autogenerated": false,
"ratio": 3.869565217391304,
"config_test... |
from fontTools.ttLib import getSearchRange
from fontTools.misc.textTools import safeEval, readHex
from fontTools.misc.fixedTools import (
fixedToFloat as fi2fl,
floatToFixed as fl2fi)
from . import DefaultTable
import struct
import sys
import array
import logging
log = logging.getLogger(__name__)
class table__k_e... | {
"repo_name": "google/material-design-icons",
"path": "update/venv/lib/python3.9/site-packages/fontTools/ttLib/tables/_k_e_r_n.py",
"copies": "5",
"size": "8423",
"license": "apache-2.0",
"hash": -317145040945890400,
"line_mean": 28.6584507042,
"line_max": 68,
"alpha_frac": 0.674581503,
"autogenera... |
from fontTools.ttLib import TTFont, newTable
from fontTools.ttLib.tables._k_e_r_n import KernTable_format_0, KernTable_format_unkown
from fontbakery.checkrunner import INFO, FAIL, WARN
from fontbakery.codetesting import (assert_PASS,
assert_results_contain,
... | {
"repo_name": "googlefonts/fontbakery",
"path": "tests/profiles/kern_test.py",
"copies": "2",
"size": "2009",
"license": "apache-2.0",
"hash": -811473691348545900,
"line_mean": 38.3921568627,
"line_max": 88,
"alpha_frac": 0.5893479343,
"autogenerated": false,
"ratio": 3.841300191204589,
"config... |
from fontTools.ttLib import TTFont
from fontTools.feaLib.builder import addOpenTypeFeatures, Builder
from fontTools.feaLib.error import FeatureLibError
from fontTools import configLogger
from fontTools.misc.cliTools import makeOutputFileName
import sys
import argparse
import logging
log = logging.getLogger("fontTools... | {
"repo_name": "google/material-design-icons",
"path": "update/venv/lib/python3.9/site-packages/fontTools/feaLib/__main__.py",
"copies": "5",
"size": "2219",
"license": "apache-2.0",
"hash": 274769174998805150,
"line_mean": 27.8181818182,
"line_max": 82,
"alpha_frac": 0.6219017575,
"autogenerated": ... |
from fontTools.ttLib import TTFont
import json
import os
import tempfile
from fontbakery.checkrunner import FAIL
from fontbakery.codetesting import (assert_PASS,
assert_results_contain,
CheckTester,
TEST_FILE)
f... | {
"repo_name": "googlefonts/fontbakery",
"path": "tests/profiles/shaping_test.py",
"copies": "1",
"size": "3511",
"license": "apache-2.0",
"hash": 8790068122700734000,
"line_mean": 34.3838383838,
"line_max": 83,
"alpha_frac": 0.5560947759,
"autogenerated": false,
"ratio": 3.6951476793248945,
"co... |
from fontTools.ttLib import TTFont
# Base 字体的编码和数字的对应关系
BASE_FONT = {
'x': '.',
'uniE2AE': '7',
'uniE450': '5',
'uniE7B8': '9',
'uniE90F': '8',
'uniEA64': '0',
'uniF0A1': '1',
'uniF442': '6',
'uniF662': '2',
'uniF69D': '4',
'uniF8B2': '3',
}
def get_glyf_data(glyf):
''... | {
"repo_name": "seamile/WeedLab",
"path": "MaoYanSpider/parse.py",
"copies": "2",
"size": "3501",
"license": "mit",
"hash": -2348253958999298000,
"line_mean": 22.7338709677,
"line_max": 78,
"alpha_frac": 0.5518178729,
"autogenerated": false,
"ratio": 2.0739957716701904,
"config_test": false,
"... |
from fontTools.ttLib.tables import DefaultTable
from fontTools.misc import sstruct
from fontTools.misc.textTools import safeEval
import struct
VDMX_HeaderFmt = """
> # big endian
version: H # Version number (0 or 1)
numRecs: H # Number of VDMX groups present
numRatios: H # Number... | {
"repo_name": "googlei18n/TachyFont",
"path": "run_time/src/gae_server/third_party/fonttools/Lib/fontTools/ttLib/tables/V_D_M_X_.py",
"copies": "4",
"size": "8193",
"license": "apache-2.0",
"hash": 260941985493819940,
"line_mean": 34.3146551724,
"line_max": 77,
"alpha_frac": 0.668253387,
"autogener... |
from fontTools.ttLib.tables import otTables as ot
from .table_builder import TableUnbuilder
def unbuildColrV1(layerV1List, baseGlyphV1List):
unbuilder = LayerV1ListUnbuilder(layerV1List.Paint)
return {
rec.BaseGlyph: unbuilder.unbuildPaint(rec.Paint)
for rec in baseGlyphV1List.BaseGlyphV1Recor... | {
"repo_name": "google/material-design-icons",
"path": "update/venv/lib/python3.9/site-packages/fontTools/colorLib/unbuilder.py",
"copies": "3",
"size": "2074",
"license": "apache-2.0",
"hash": -2067562385833911600,
"line_mean": 25.253164557,
"line_max": 77,
"alpha_frac": 0.581485053,
"autogenerated... |
from fontTools.ttLib.ttFont import TTFont
from fontTools.ttLib.sfnt import readTTCHeader, writeTTCHeader
from io import BytesIO
import struct
import logging
log = logging.getLogger(__name__)
class TTCollection(object):
"""Object representing a TrueType Collection / OpenType Collection.
The main API is self.fonts ... | {
"repo_name": "google/material-design-icons",
"path": "update/venv/lib/python3.9/site-packages/fontTools/ttLib/ttCollection.py",
"copies": "5",
"size": "2960",
"license": "apache-2.0",
"hash": -3090669484107063000,
"line_mean": 24.5172413793,
"line_max": 77,
"alpha_frac": 0.7027027027,
"autogenerat... |
from fontTools.varLib.instancer import instantiateVariableFont, OverlapMode
from gftools.fix import update_nametable, fix_fs_selection, fix_mac_style
from gftools.utils import font_stylename, font_familyname
__all__ = ["gen_static_font"]
def gen_static_font(
var_font, axes, family_name=None, style_name=None, ke... | {
"repo_name": "googlefonts/gftools",
"path": "Lib/gftools/instancer.py",
"copies": "1",
"size": "1997",
"license": "apache-2.0",
"hash": -5766310285091494000,
"line_mean": 35.9814814815,
"line_max": 84,
"alpha_frac": 0.6805207812,
"autogenerated": false,
"ratio": 3.6575091575091574,
"config_tes... |
from fontTools.voltLib.error import VoltLibError
class Lexer(object):
NUMBER = "NUMBER"
STRING = "STRING"
NAME = "NAME"
NEWLINE = "NEWLINE"
CHAR_WHITESPACE_ = " \t"
CHAR_NEWLINE_ = "\r\n"
CHAR_DIGIT_ = "0123456789"
CHAR_UC_LETTER_ = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
CHAR_LC_LETTER_ = "a... | {
"repo_name": "google/material-design-icons",
"path": "update/venv/lib/python3.9/site-packages/fontTools/voltLib/lexer.py",
"copies": "6",
"size": "3417",
"license": "apache-2.0",
"hash": -4056876380195267000,
"line_mean": 33.5151515152,
"line_max": 78,
"alpha_frac": 0.5229733685,
"autogenerated": ... |
from fooapp import FooApp, start_app
from ncore.data import FileStore
from ncore.daemon import become_daemon
from netgrowl import GrowlRegistrationPacket, GrowlNotificationPacket, GROWL_UDP_PORT
from socket import socket, AF_INET, SOCK_DGRAM
import logging
class Growl(FooApp):
name = 'growl'
config_opts = {
... | {
"repo_name": "JeremyGrosser/foobox",
"path": "growl.py",
"copies": "1",
"size": "1098",
"license": "bsd-3-clause",
"hash": -466811408264345200,
"line_mean": 32.2727272727,
"line_max": 85,
"alpha_frac": 0.64571949,
"autogenerated": false,
"ratio": 3.576547231270358,
"config_test": false,
"has... |
from fooapp import FooApp, start_app
from time import sleep
from datetime import tzinfo
from datetime import datetime
from xml.etree import ElementTree
from ncore.data import FileStore
from ncore.daemon import become_daemon
from ncore.rest import request
import logging
import sys
try:
import json
except ImportError... | {
"repo_name": "JeremyGrosser/foobox",
"path": "ups.py",
"copies": "1",
"size": "3133",
"license": "bsd-3-clause",
"hash": 5562004739862869000,
"line_mean": 31.2989690722,
"line_max": 100,
"alpha_frac": 0.5636769869,
"autogenerated": false,
"ratio": 3.896766169154229,
"config_test": false,
"ha... |
from fooapp import FooApp, start_app
from time import sleep
from xmlrpclib import ServerProxy
from ncore.data import FileStore
from ncore.daemon import become_daemon
try:
import json
except ImportError:
import simplejson as json
class Hella(FooApp):
name = 'hella'
config_opts = {
'password': 'The password define... | {
"repo_name": "JeremyGrosser/foobox",
"path": "hella.py",
"copies": "1",
"size": "1293",
"license": "bsd-3-clause",
"hash": -8821460938804824000,
"line_mean": 27.7333333333,
"line_max": 127,
"alpha_frac": 0.6813611756,
"autogenerated": false,
"ratio": 3,
"config_test": false,
"has_no_keywords... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.