initial import
git-svn-id: http://svn.robofab.com/trunk@1 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
This commit is contained in:
commit
3646055ea2
6
Documentation/CVS/Entries
Normal file
6
Documentation/CVS/Entries
Normal file
@ -0,0 +1,6 @@
|
||||
/makeDocumentation.py/1.7/Thu Sep 4 07:53:53 2003//
|
||||
/ToDo.txt/1.32/Fri Oct 3 12:25:36 2003//
|
||||
D/robofabManual////
|
||||
D/robofabDocs////
|
||||
/typotechnica.txt/1.12/Result of merge+Sun Jan 23 20:14:27 2005//
|
||||
D/TextDoc////
|
1
Documentation/CVS/Entries.Log
Normal file
1
Documentation/CVS/Entries.Log
Normal file
@ -0,0 +1 @@
|
||||
R D/TextDoc////
|
1
Documentation/CVS/Repository
Normal file
1
Documentation/CVS/Repository
Normal file
@ -0,0 +1 @@
|
||||
projects/robofab/Documentation
|
1
Documentation/CVS/Root
Normal file
1
Documentation/CVS/Root
Normal file
@ -0,0 +1 @@
|
||||
:pserver:Erik@letterror.xs4all.nl:/Library/cvsroot
|
94
Documentation/ToDo.txt
Normal file
94
Documentation/ToDo.txt
Normal file
@ -0,0 +1,94 @@
|
||||
RoboFab ToDo List
|
||||
|
||||
A list of things that need to be done before RoboThon. Add things to the list that need to be done. If something is absolutely necessary, add it to the 1.0 list. Otherwise, add it to the 2.0 list.
|
||||
|
||||
############
|
||||
RoboFab 1.0: The Dawn of a New Age
|
||||
############
|
||||
|
||||
BUGS to be fixed before release:
|
||||
- I think we need to have a look at that "scheduledForDeletion" stuff. For example,
|
||||
I think the following scenario may not work: delete "A", add new "A".
|
||||
|
||||
Documentation:
|
||||
---------------
|
||||
- nail down & document the UFO/GLIF formats, at least the basic stuff
|
||||
(This is well underway at the wiki)
|
||||
- write doc strings for all properties
|
||||
- write doc strings for public stuff
|
||||
- comment out doc strings on private stuff
|
||||
|
||||
General Stuff:
|
||||
---------------
|
||||
- write setup.py script.
|
||||
- invent really really easy install script.
|
||||
- include iGlyph (as an app anyway)
|
||||
- remove all deprecated stuff
|
||||
- remove lib magic, replace with less surprising plain dicts.
|
||||
- Write tests.
|
||||
|
||||
The UFO, GLIF and Pens:
|
||||
---------------
|
||||
- Create test glyphs in the demo font that excercise vairous outline
|
||||
features and edge cases.
|
||||
- Write tests.
|
||||
- Attempt to convert all 'fab pens to FontTools pens? We're very close --
|
||||
I think the biggest thing to do is convert all addComponent() calls
|
||||
and implementations. It will be worthwile: it will cause pretty massive
|
||||
code deletion. (Getting closer!!)
|
||||
|
||||
FontLab
|
||||
-------
|
||||
- Write tests.
|
||||
|
||||
Objects:
|
||||
---------------
|
||||
Objects will need a complete inspection. Perhaps sort of "F* Up Everything
|
||||
In The Font For Testing Purposes" script is in order.
|
||||
|
||||
- clean up all the unneeded stuff.
|
||||
|
||||
objectsBase:
|
||||
- work out removeBPoint method (yeah, right)
|
||||
|
||||
objectsFL:
|
||||
- get rid of all the getFoo methods in RGlyph? this should be a 1.1 change as it touches many modules.
|
||||
|
||||
objectsRF:
|
||||
- test various contour methods.
|
||||
- make sure ALL changes are flagging the font and needed objects as changed.
|
||||
|
||||
|
||||
############
|
||||
RoboFab 2.0: Bigger and Badder.
|
||||
############
|
||||
|
||||
- Make RoboFab 1.0 better
|
||||
|
||||
objects:
|
||||
-glyph.contours, glyph.anchors and glyph.components should return a
|
||||
special list. this list would be a new style class subclassed from a dict
|
||||
object. the main avantage of this would be that we could make normal list
|
||||
methods work with the objects, ie glyph.contours.append(...), del
|
||||
glyph.contours[X] instead of the crummy appendFoo and removeFoo
|
||||
stuff that is in there now. This could also apply to contour.segments and
|
||||
segment.points as well.
|
||||
|
||||
objectsFL:
|
||||
- write better algo for writing kerning back into FL font.
|
||||
|
||||
objectsRF:
|
||||
- work out save as. (waiting on new glifLib before proceeding.)
|
||||
- rework NewFont. as it is now, it doesn't really work since a GlyphSet is
|
||||
needed for some special methods, but when a new font is created it doesn't
|
||||
have a path and therefore a GlyphSet. i (tal) have some ideas on how to fix
|
||||
this, but i will wait until version 1.1. this will also need the save as method
|
||||
mentioned above.
|
||||
|
||||
The UFO and GLIF:
|
||||
---------------
|
||||
- new/revised glifLib and glif format that supports more than one glyph in a file.
|
||||
- Factor out format-specific info from font.info/fontinfo.plist into a to be
|
||||
designed "targets" object and file. A "target" is a description for a specific
|
||||
output file, or set of output files. This will need lots of experimentation
|
||||
and careful design. Think of it as a "generate fonts" toolkit.
|
@ -0,0 +1,99 @@
|
||||
#FLM: Batch change font info
|
||||
|
||||
# Paul van der Laan, 2004/09/13
|
||||
|
||||
|
||||
|
||||
from robofab.interface.all.dialogs import GetFolder
|
||||
from robofab.world import RFont, OpenFont, CurrentFont
|
||||
import os
|
||||
|
||||
|
||||
|
||||
# Een functie om een map met files door te zoeken op vfb files
|
||||
def collectSources(root):
|
||||
files = []
|
||||
ext = ['.vfb']
|
||||
names = os.listdir(root)
|
||||
for n in names:
|
||||
if os.path.splitext(n)[1] in ext:
|
||||
files.append(os.path.join(root, n))
|
||||
return files
|
||||
|
||||
myID = 5116478
|
||||
|
||||
# main loop
|
||||
mySource = GetFolder()
|
||||
if mySource is not None:
|
||||
myFiles = collectSources(mySource)
|
||||
for myFile in myFiles:
|
||||
myrfFont = None
|
||||
try:
|
||||
myrfFont = OpenFont(myFile)
|
||||
myFont = fl.font
|
||||
|
||||
# myFont.width="Medium (normal)"
|
||||
|
||||
# myFamilyname = myFont.family_name
|
||||
# myFont.family_name = myFamilyname
|
||||
# myFont.font_name = myFont.family_name + "-" + myFont.style_name
|
||||
# myFont.full_name = myFont.family_name + " " + myFont.style_name
|
||||
# myFont.menu_name = myFont.family_name
|
||||
# myFont.apple_name = myFont.family_name + "-" + myFont.style_name
|
||||
|
||||
# myFont.year=1999
|
||||
# myFont.copyright="Designed by Paul van der Laan. Copyright (c) 1999 Type Invaders. Flex is a trademark of Type Invaders. Flex is protected by copyright law. Unauthorized copying or modification of any of its data is illegal. Modified by TEFF for exclusive use by Van Dale Lexicografie bv, 2004."
|
||||
# myFont.notice=""
|
||||
|
||||
# myFont.designer="Paul van der Laan"
|
||||
# myFont.designer_url="http://www.type-invaders.com"
|
||||
# myFont.vendor_url="http://www.type-invaders.com"
|
||||
|
||||
# myFont.version_major = 0
|
||||
# myFont.version_minor = 97
|
||||
# myFont.version = "000.970"
|
||||
|
||||
# myID = myFont.unique_id
|
||||
myFont.unique_id = myID
|
||||
myFont.fond_id = int(str(myID)[-4:])
|
||||
# myFont.vendor="INVD"
|
||||
|
||||
myID = myID + 1
|
||||
|
||||
# myFont.panose[0] = 2
|
||||
# myFont.panose[1] = 0
|
||||
# myFont.panose[2] = 5
|
||||
# myFont.panose[3] = 6
|
||||
# myFont.panose[4] = 2
|
||||
# myFont.panose[5] = 0
|
||||
# myFont.panose[6] = 0
|
||||
# myFont.panose[7] = 2
|
||||
# myFont.panose[8] = 0
|
||||
# myFont.panose[9] = 4
|
||||
|
||||
# myFont.pcl_id = -1
|
||||
# myFont.vp_id = -1
|
||||
# myFont.ms_id= 2
|
||||
|
||||
# myFont.upm = 1000
|
||||
# myFont.ascender[0] = 784
|
||||
# myFont.descender[0] = -240
|
||||
# myFont.cap_height[0] = 712
|
||||
# myFont.x_height[0] = 498
|
||||
|
||||
# if myFont.style_name == "Italic":
|
||||
# myFont.italic_angle = 12.0
|
||||
# myFont.slant_angle = 0.0
|
||||
|
||||
# myFont.underline_position=-100
|
||||
# myFont.underline_thickness=50
|
||||
|
||||
# myFont.ms_charset=0
|
||||
# myFont.default_character="bullet"
|
||||
|
||||
myrfFont.update()
|
||||
myrfFont.save()
|
||||
finally:
|
||||
if myrfFont is not None:
|
||||
myrfFont.close(False)
|
||||
print "Done"
|
@ -0,0 +1,47 @@
|
||||
#FLM: Batch version change
|
||||
|
||||
# Paul van der Laan, 2004/10/25
|
||||
|
||||
|
||||
from robofab.interface.all.dialogs import GetFolder
|
||||
from robofab.world import RFont, OpenFont, CurrentFont
|
||||
import os
|
||||
|
||||
|
||||
# Een functie om een map met files door te zoeken op vfb files
|
||||
def collectSources(root):
|
||||
files = []
|
||||
ext = ['.vfb']
|
||||
names = os.listdir(root)
|
||||
for n in names:
|
||||
if os.path.splitext(n)[1] in ext:
|
||||
files.append(os.path.join(root, n))
|
||||
return files
|
||||
|
||||
# main loop
|
||||
mySource = GetFolder()
|
||||
if mySource is not None:
|
||||
myFiles = collectSources(mySource)
|
||||
for myFile in myFiles:
|
||||
myrfFont = None
|
||||
try:
|
||||
myrfFont = OpenFont(myFile)
|
||||
|
||||
myFamilyname = myrfFont.info.familyName
|
||||
myStylename = myrfFont.info.styleName
|
||||
myFamilyname = myFamilyname.replace("V01", "V02")
|
||||
|
||||
myrfFont.info.familyName = myFamilyname
|
||||
myrfFont.info.fontName = myFamilyname + "-" + myStylename
|
||||
myrfFont.info.fullName = myFamilyname + " " + myStylename
|
||||
myrfFont.info.menuName = myFamilyname
|
||||
myrfFont.info.fondName = myFamilyname + "-" + myStylename
|
||||
|
||||
print myFamilyname + "-" + myStylename
|
||||
|
||||
myrfFont.update()
|
||||
myrfFont.save()
|
||||
finally:
|
||||
if myrfFont is not None:
|
||||
myrfFont.close(False)
|
||||
print "Done"
|
File diff suppressed because one or more lines are too long
@ -0,0 +1,76 @@
|
||||
#FLM: Batch export glyphs to rtf
|
||||
|
||||
# Paul van der Laan, 2004/11/02
|
||||
|
||||
|
||||
from robofab.interface.all.dialogs import GetFolder, ProgressBar
|
||||
from robofab.world import RFont, OpenFont
|
||||
import os
|
||||
|
||||
mySize = 16
|
||||
myLeading = 22
|
||||
|
||||
|
||||
# Een functie om een map met files door te zoeken op vfb files
|
||||
def collectSources(root):
|
||||
files = []
|
||||
ext = ['.vfb']
|
||||
names = os.listdir(root)
|
||||
for n in names:
|
||||
if os.path.splitext(n)[1] in ext:
|
||||
files.append(os.path.join(root, n))
|
||||
return files
|
||||
|
||||
# main loop
|
||||
mySource = GetFolder()
|
||||
if mySource is not None:
|
||||
myPath = mySource + ":glyph overview.rtf"
|
||||
myrtfFile = open(myPath, "w")
|
||||
myrtfFile.write("{\\rtf1\\mac\\ansicpg1252" + chr(13))
|
||||
myPagebreak = ""
|
||||
|
||||
myFiles = collectSources(mySource)
|
||||
for myFile in myFiles:
|
||||
myFont = None
|
||||
try:
|
||||
myFont = OpenFont(myFile)
|
||||
myflFont = fl.font
|
||||
myEncoding = myflFont.encoding
|
||||
myFontfam = myFont.info.familyName
|
||||
myFontstyle = myFont.info.styleName
|
||||
myList = [""] * len(myEncoding)
|
||||
|
||||
for myGlyph in myFont:
|
||||
myGlyphname = myGlyph.name
|
||||
myIndex = myEncoding.FindName(myGlyphname)
|
||||
if myIndex is not -1:
|
||||
myList[myIndex] = myGlyph.unicode
|
||||
|
||||
if myFont.info.designer is None:
|
||||
myFont.info.designer = "-"
|
||||
if myFont.info.year is None:
|
||||
myFont.info.year = "1452"
|
||||
|
||||
myBar = ProgressBar('Exporting glyphs...', len(myList))
|
||||
myLine = myPagebreak + "{\\fonttbl\\f0\\fnil\\cpg819 " + myFontfam + "-" + myFontstyle + ";}" + chr(13) + "\\f0\\sl-" + str(myLeading*20) + "\\fs" + str(mySize*2) + chr(13) + "\\par "
|
||||
myrtfFile.write(myLine)
|
||||
for myItem in range (0, len(myList)):
|
||||
if myList[myItem]:
|
||||
myHex = hex(myItem)[-2:]
|
||||
myHex = myHex.replace("x", "0")
|
||||
myWord = "\u" + str(myList[myItem]) + "\\'" + myHex + " "
|
||||
myrtfFile.write(myWord)
|
||||
myBar.tick()
|
||||
myPagebreak = "\page" + chr(13)
|
||||
myBar.close()
|
||||
finally:
|
||||
if myFont is not None:
|
||||
myFont.close(False)
|
||||
print "Generated glyph overview for", myFontfam + "-" + myFontstyle
|
||||
myrtfFile.write(chr(13) + "}")
|
||||
myrtfFile.close()
|
||||
print "Done"
|
||||
|
||||
|
||||
|
||||
# \f0\fnil\fcharset77 AndaleMono;
# \f1\fswiss\fcharset77 Helvetica;
# \f2\fnil\fcharset77 Georgia;
|
@ -0,0 +1,130 @@
|
||||
#FLM: Batch font report
|
||||
|
||||
from robofab.interface.all.dialogs import GetFolder
|
||||
from robofab.world import OpenFont, CurrentFont
|
||||
import os
|
||||
|
||||
|
||||
# Een functie om een map met files door te zoeken op vfb files
|
||||
def collectSources(root):
|
||||
files = []
|
||||
ext = ['.vfb']
|
||||
names = os.listdir(root)
|
||||
for n in names:
|
||||
if os.path.splitext(n)[1] in ext:
|
||||
files.append(os.path.join(root, n))
|
||||
return files
|
||||
|
||||
|
||||
# main loop
|
||||
myFolder = GetFolder()
|
||||
myPath = myFolder + ":fontreport.txt"
|
||||
|
||||
|
||||
myRecord = ["Filename", "Glyphs", "Kerning pairs", "Family name", "Weight", "Weight code", "Width", "Style", "Style name", "Font name", "Full name", "Menu name", "FOND name", "OT Family name", "OT Style name" ,"OT Mac name", "Year", "Copyright", "Trademark", "Notice", "Designer", "Designer URL", "Vendor URL", "Version", "Revision", "Version", "TrueType version", "TrueType unique ID", "Type 1 unique ID", "TrueType vendor", "PANOSE", "PCL ID", "VP ID", "MS ID", "UPM", "Ascender", "Descender", "Cap height", "X height", "Italic angle", "Slant angle", "Underline", "Thickness", "Monospaced", "MS Charset", "Default char", "Mac FOND ID", "Blue fuzz", "Blue scale", "Blue shift", "Blue values",
"Other blues", "Family blues", "Other family blues", "Force bold", "Horizontal stems", "Vertical stems"]
|
||||
|
||||
myLen=len(myRecord)
|
||||
|
||||
myFile = open(myPath, "w")
|
||||
for myItem in myRecord:
|
||||
myFile.write(str(myItem + "\t"))
|
||||
myFile.write("\r")
|
||||
myFile.close()
|
||||
|
||||
if myFolder is not None:
|
||||
myFiles = collectSources(myFolder)
|
||||
|
||||
for mySourcefile in myFiles:
|
||||
myflFont = None
|
||||
try:
|
||||
myrfFont = OpenFont(mySourcefile)
|
||||
myflFont = fl.font
|
||||
|
||||
for x in range(myLen):
|
||||
myRecord[x]=""
|
||||
|
||||
if myflFont.file_name:
|
||||
myFilename = str(myflFont.file_name).split(":")
|
||||
myRecord[0] = myFilename[-1]
|
||||
myRecord[1] = str(len(myflFont))
|
||||
myRecord[2] = str(len(myrfFont.kerning.keys()))
|
||||
|
||||
if myflFont.family_name: myRecord[3] = str(myflFont.family_name)
|
||||
if myflFont.weight: myRecord[4] = str(myflFont.weight)
|
||||
myRecord[5] = str(myflFont.weight_code)
|
||||
if myflFont.width: myRecord[6] = str(myflFont.width)
|
||||
myRecord[7] = str(myflFont.font_style)
|
||||
# 1=italic, 32=bold, 64=regular
|
||||
if myflFont.style_name: myRecord[8] = str(myflFont.style_name)
|
||||
if myflFont.font_name: myRecord[9] = str(myflFont.font_name)
|
||||
if myflFont.full_name: myRecord[10] = str(myflFont.full_name)
|
||||
if myflFont.menu_name: myRecord[11] = str(myflFont.menu_name)
|
||||
if myflFont.apple_name: myRecord[12] = str(myflFont.apple_name)
|
||||
|
||||
if myflFont.pref_family_name: myRecord[13] = str(myflFont.pref_family_name)
|
||||
if myflFont.pref_style_name: myRecord[14] = str(myflFont.pref_style_name)
|
||||
if myflFont.mac_compatible: myRecord[15] = str(myflFont.mac_compatible)
|
||||
|
||||
myRecord[16] = str(myflFont.year)
|
||||
if myflFont.copyright: myRecord[17] = str(myflFont.copyright)
|
||||
if myflFont.trademark: myRecord[18] = str(myflFont.trademark)
|
||||
if myflFont.notice: myRecord[19] = str(myflFont.notice)
|
||||
|
||||
if myflFont.designer: myRecord[20] = str(myflFont.designer)
|
||||
if myflFont.designer_url: myRecord[21] = str(myflFont.designer_url)
|
||||
if myflFont.vendor_url: myRecord[22] = str(myflFont.vendor_url)
|
||||
|
||||
myRecord[23] = str(myflFont.version_major)
|
||||
myRecord[24] = str(myflFont.version_minor)
|
||||
if myflFont.version: myRecord[25] = str(myflFont.version)
|
||||
if myflFont.tt_version: myRecord[26] = str(myflFont.tt_version)
|
||||
|
||||
if myflFont.tt_u_id: myRecord[27] = str(myflFont.tt_u_id)
|
||||
myRecord[28] = str(myflFont.unique_id)
|
||||
if myflFont.vendor: myRecord[29] = str(myflFont.vendor)
|
||||
|
||||
if myflFont.panose: myRecord[30] = str(myflFont.panose)
|
||||
|
||||
myRecord[31] = str(myflFont.pcl_id)
|
||||
myRecord[32] = str(myflFont.vp_id)
|
||||
myRecord[33] = str(myflFont.ms_id)
|
||||
|
||||
myRecord[34] = str(myflFont.upm)
|
||||
|
||||
myRecord[35] = str(myflFont.ascender[0])
|
||||
myRecord[36] = str(myflFont.descender[0])
|
||||
myRecord[37] = str(myflFont.cap_height[0])
|
||||
myRecord[38] = str(myflFont.x_height[0])
|
||||
myRecord[39] = str(myflFont.italic_angle)
|
||||
myRecord[40] = str(myflFont.slant_angle)
|
||||
myRecord[41] = str(myflFont.underline_position)
|
||||
myRecord[42] = str(myflFont.underline_thickness)
|
||||
myRecord[43] = str(myflFont.is_fixed_pitch)
|
||||
|
||||
myRecord[44] = str(myflFont.ms_charset)
|
||||
if myflFont.default_character: myRecord[45] = str(myflFont.default_character)
|
||||
myRecord[46] = str(myflFont.fond_id)
|
||||
|
||||
myRecord[47] = str(myflFont.blue_fuzz[0])
|
||||
myRecord[48] = str(myflFont.blue_scale[0])
|
||||
myRecord[49] = str(myflFont.blue_shift[0])
|
||||
myRecord[50] = str(myflFont.blue_values[0])
|
||||
myRecord[51] = str(myflFont.other_blues[0])
|
||||
myRecord[52] = str(myflFont.family_blues[0])
|
||||
myRecord[53] = str(myflFont.family_other_blues[0])
|
||||
myRecord[54] = str(myflFont.force_bold[0])
|
||||
myRecord[55] = str(myflFont.stem_snap_h[0])
|
||||
myRecord[56] = str(myflFont.stem_snap_v[0])
|
||||
|
||||
myFile = open(myPath, "r+")
|
||||
myFile.seek(0,2)
|
||||
for myItem in myRecord:
|
||||
myFile.write(str(myItem + "\t"))
|
||||
myFile.write("\r")
|
||||
myFile.close()
|
||||
|
||||
finally:
|
||||
if myrfFont is not None:
|
||||
myrfFont.close(False)
|
||||
|
||||
print "Done"
|
@ -0,0 +1,71 @@
|
||||
#FLM: Batch generate Mac, Win & Unix
|
||||
|
||||
# Generates three formats at once:
|
||||
# Macintosh PS Type 1
|
||||
# Windows PS Type 1
|
||||
# Unix PS Type 1
|
||||
|
||||
from robofab.interface.all.dialogs import GetFolder
|
||||
from robofab.world import RFont, OpenFont
|
||||
import os
|
||||
|
||||
# Een functie om een map met files door te zoeken op vfb files
|
||||
def collectSources(root):
|
||||
files = []
|
||||
ext = ['.vfb']
|
||||
names = os.listdir(root)
|
||||
for n in names:
|
||||
if os.path.splitext(n)[1] in ext:
|
||||
files.append(os.path.join(root, n))
|
||||
return files
|
||||
|
||||
# A little function for making folders. we'll need it later.
|
||||
def makeFolder(path):
|
||||
#if the path doesn't exist, make it!
|
||||
if not os.path.exists(path):
|
||||
os.makedirs(path)
|
||||
|
||||
# maak verschillende mapjes aan voor de fontformaten
|
||||
def makeDestination(root):
|
||||
basePath = os.path.join(root, 'Generated',)
|
||||
macPath = os.path.join(root, 'Generated', 'mac ps type 1')
|
||||
makeFolder(macPath)
|
||||
winPath = os.path.join(root, 'Generated', 'win ps type 1')
|
||||
makeFolder(winPath)
|
||||
unixPath = os.path.join(root, 'Generated', 'unix ps type 1')
|
||||
makeFolder(unixPath)
|
||||
return basePath
|
||||
|
||||
# genereer de drie formaten
|
||||
def generateOne(f, dstDir):
|
||||
dstMac = os.path.join(dstDir, 'mac ps type 1')
|
||||
f.generate('mactype1', dstMac)
|
||||
dstWin = os.path.join(dstDir, 'win ps type 1')
|
||||
f.generate('pctype1', dstWin)
|
||||
dstUnix = os.path.join(dstDir, 'unix ps type 1')
|
||||
f.generate('pctype1ascii', dstUnix)
|
||||
print "%s - %s"%(f.info.uniqueID, f.info.fullName)
|
||||
# print unique ID en naam in het output window
|
||||
|
||||
# dialog voor het selecteren van een folder
|
||||
f = GetFolder()
|
||||
|
||||
if f is not None:
|
||||
paths = collectSources(f)
|
||||
dstDir = makeDestination(f)
|
||||
|
||||
print 'UniqueID Full fontname'
|
||||
print '-------------------------------------------'
|
||||
|
||||
for f in paths:
|
||||
font = None
|
||||
try:
|
||||
font = OpenFont(f)
|
||||
generateOne(font, dstDir)
|
||||
|
||||
finally:
|
||||
if font is not None:
|
||||
fl.font.modified = 0
|
||||
font.close(False)
|
||||
|
||||
print 'done'
|
@ -0,0 +1,59 @@
|
||||
#FLM: Batch generate Mac
|
||||
|
||||
|
||||
from robofab.interface.all.dialogs import GetFolder
|
||||
from robofab.world import RFont, OpenFont
|
||||
import os
|
||||
|
||||
# Een functie om een map met files door te zoeken op vfb files
|
||||
def collectSources(root):
|
||||
files = []
|
||||
ext = ['.vfb']
|
||||
names = os.listdir(root)
|
||||
for n in names:
|
||||
if os.path.splitext(n)[1] in ext:
|
||||
files.append(os.path.join(root, n))
|
||||
return files
|
||||
|
||||
# A little function for making folders. we'll need it later.
|
||||
def makeFolder(path):
|
||||
#if the path doesn't exist, make it!
|
||||
if not os.path.exists(path):
|
||||
os.makedirs(path)
|
||||
|
||||
# maak verschillende mapjes aan voor de fontformaten
|
||||
def makeDestination(root):
|
||||
basePath = os.path.join(root, 'Generated',)
|
||||
macPath = os.path.join(root, 'Generated', 'mac ps type 1')
|
||||
makeFolder(macPath)
|
||||
return basePath
|
||||
|
||||
# genereer de drie formaten
|
||||
def generateOne(f, dstDir):
|
||||
dstMac = os.path.join(dstDir, 'mac ps type 1')
|
||||
f.generate('mactype1', dstMac)
|
||||
print "%s - %s"%(f.info.uniqueID, f.info.fullName)
|
||||
# print unique ID en naam in het output window
|
||||
|
||||
# dialog voor het selecteren van een folder
|
||||
f = GetFolder()
|
||||
|
||||
if f is not None:
|
||||
paths = collectSources(f)
|
||||
dstDir = makeDestination(f)
|
||||
|
||||
print 'UniqueID Full fontname'
|
||||
print '-------------------------------------------'
|
||||
|
||||
for f in paths:
|
||||
font = None
|
||||
try:
|
||||
font = OpenFont(f)
|
||||
generateOne(font, dstDir)
|
||||
|
||||
finally:
|
||||
if font is not None:
|
||||
fl.font.modified = 0
|
||||
font.close(False)
|
||||
|
||||
print 'done'
|
@ -0,0 +1,59 @@
|
||||
#FLM: Batch generate Win TT
|
||||
|
||||
|
||||
from robofab.interface.all.dialogs import GetFolder
|
||||
from robofab.world import RFont, OpenFont
|
||||
import os
|
||||
|
||||
# Een functie om een map met files door te zoeken op vfb files
|
||||
def collectSources(root):
|
||||
files = []
|
||||
ext = ['.vfb']
|
||||
names = os.listdir(root)
|
||||
for n in names:
|
||||
if os.path.splitext(n)[1] in ext:
|
||||
files.append(os.path.join(root, n))
|
||||
return files
|
||||
|
||||
# A little function for making folders. we'll need it later.
|
||||
def makeFolder(path):
|
||||
#if the path doesn't exist, make it!
|
||||
if not os.path.exists(path):
|
||||
os.makedirs(path)
|
||||
|
||||
# maak verschillende mapjes aan voor de fontformaten
|
||||
def makeDestination(root):
|
||||
basePath = os.path.join(root, 'Generated',)
|
||||
macPath = os.path.join(root, 'Generated', 'win truetype')
|
||||
makeFolder(macPath)
|
||||
return basePath
|
||||
|
||||
# genereer de drie formaten
|
||||
def generateOne(f, dstDir):
|
||||
dstMac = os.path.join(dstDir, 'win truetype')
|
||||
f.generate('otfttf', dstMac)
|
||||
print "%s"%(f.info.fullName)
|
||||
# print unique ID en naam in het output window
|
||||
|
||||
# dialog voor het selecteren van een folder
|
||||
f = GetFolder()
|
||||
|
||||
if f is not None:
|
||||
paths = collectSources(f)
|
||||
dstDir = makeDestination(f)
|
||||
|
||||
print 'Full fontname'
|
||||
print '-------------------------------------------'
|
||||
|
||||
for f in paths:
|
||||
font = None
|
||||
try:
|
||||
font = OpenFont(f)
|
||||
generateOne(font, dstDir)
|
||||
|
||||
finally:
|
||||
if font is not None:
|
||||
fl.font.modified = 0
|
||||
font.close(False)
|
||||
|
||||
print 'done'
|
@ -0,0 +1,66 @@
|
||||
#FLM: Batch generate Win & Unix
|
||||
|
||||
# Generates two formats at once:
|
||||
# Windows PS Type 1
|
||||
# Unix PS Type 1
|
||||
|
||||
from robofab.interface.all.dialogs import GetFolder
|
||||
from robofab.world import RFont, OpenFont
|
||||
import os
|
||||
|
||||
# Een functie om een map met files door te zoeken op vfb files
|
||||
def collectSources(root):
|
||||
files = []
|
||||
ext = ['.vfb']
|
||||
names = os.listdir(root)
|
||||
for n in names:
|
||||
if os.path.splitext(n)[1] in ext:
|
||||
files.append(os.path.join(root, n))
|
||||
return files
|
||||
|
||||
# A little function for making folders. we'll need it later.
|
||||
def makeFolder(path):
|
||||
#if the path doesn't exist, make it!
|
||||
if not os.path.exists(path):
|
||||
os.makedirs(path)
|
||||
|
||||
# maak verschillende mapjes aan voor de fontformaten
|
||||
def makeDestination(root):
|
||||
basePath = os.path.join(root, 'Generated',)
|
||||
winPath = os.path.join(root, 'Generated', 'win ps type 1')
|
||||
makeFolder(winPath)
|
||||
unixPath = os.path.join(root, 'Generated', 'unix ps type 1')
|
||||
makeFolder(unixPath)
|
||||
return basePath
|
||||
|
||||
# genereer de drie formaten
|
||||
def generateOne(f, dstDir):
|
||||
dstWin = os.path.join(dstDir, 'win ps type 1')
|
||||
f.generate('pctype1', dstWin)
|
||||
dstUnix = os.path.join(dstDir, 'unix ps type 1')
|
||||
f.generate('pctype1ascii', dstUnix)
|
||||
print "%s - %s"%(f.info.uniqueID, f.info.fullName)
|
||||
# print unique ID en naam in het output window
|
||||
|
||||
# dialog voor het selecteren van een folder
|
||||
f = GetFolder()
|
||||
|
||||
if f is not None:
|
||||
paths = collectSources(f)
|
||||
dstDir = makeDestination(f)
|
||||
|
||||
print 'UniqueID Full fontname'
|
||||
print '-------------------------------------------'
|
||||
|
||||
for f in paths:
|
||||
font = None
|
||||
try:
|
||||
font = OpenFont(f)
|
||||
generateOne(font, dstDir)
|
||||
|
||||
finally:
|
||||
if font is not None:
|
||||
fl.font.modified = 0
|
||||
font.close(False)
|
||||
|
||||
print 'done'
|
@ -0,0 +1,74 @@
|
||||
#FLM: Batch interpolate
|
||||
|
||||
# Paul van der Laan, 2004/08/11
|
||||
|
||||
from robofab.world import SelectFont, CurrentFont
|
||||
from robofab.interface.all.dialogs import ProgressBar, GetFolder
|
||||
|
||||
myFolder = GetFolder()
|
||||
# myPars = ((.21, "ExtraLight", 200), (.55, "Light", 300)) # Kievit factor, weight, weightcode
|
||||
myPars = ((.36, "Medium", 500), (.63, "Bold", 700)) # Flex factor, weight, weightcode
|
||||
|
||||
|
||||
myMin = SelectFont('Select source font one:')
|
||||
if myMin:
|
||||
myMax = SelectFont('Select source font two:')
|
||||
if myMax:
|
||||
|
||||
for myInterpol in myPars:
|
||||
|
||||
myFactor = myInterpol[0]
|
||||
myWeight = myInterpol[1]
|
||||
myWeightcode = myInterpol[2]
|
||||
myFamilyname = myMin.info.familyName # "Flex"
|
||||
|
||||
fl.CallCommand(fl_cmd.FileNew)
|
||||
myDest = CurrentFont()
|
||||
bar = ProgressBar('Interpolating...', len(myMin))
|
||||
for myChar in myMin:
|
||||
myCharname = myChar.name
|
||||
myNewglyph = myDest.newGlyph(myCharname)
|
||||
myNewglyph.interpolate(myFactor, myMin[myCharname], myMax[myCharname])
|
||||
# myDest[myCharname].mark = 26
|
||||
bar.tick()
|
||||
bar.close()
|
||||
myDest.update()
|
||||
|
||||
myMinkern = myMin.kerning
|
||||
myMaxkern = myMax.kerning
|
||||
myDestkern = myDest.kerning
|
||||
myDestkern.interpolate(myMinkern,myMaxkern,myFactor,clearExisting=True)
|
||||
|
||||
myDest.info.familyName = myFamilyname
|
||||
fl.font.weight = myWeight
|
||||
fl.font.weight_code = myWeightcode
|
||||
myStylename = myWeight + myMin.info.styleName[-3:]
|
||||
myDest.info.styleName = myStylename
|
||||
myDest.info.fontName = myMin.info.familyName + "-" + myStylename
|
||||
myDest.info.fullName = myMin.info.familyName + " " + myStylename
|
||||
myDest.info.menuName = myMin.info.familyName
|
||||
myDest.info.fondName = myMin.info.familyName + "-" + myStylename
|
||||
|
||||
myDest.info.year = 1999
|
||||
# myDest.info.copyright = u"2001 Mike Abbink. Produced by Type Invaders"
|
||||
myDest.info.designer = "Paul van der Laan"
|
||||
|
||||
fl.font.upm = 1000
|
||||
fl.font.ascender[0] = 730
|
||||
fl.font.descender[0] = -270
|
||||
fl.font.x_height[0] = 480
|
||||
fl.font.cap_height[0] = 616
|
||||
fl.font.default_character = "bullet"
|
||||
|
||||
myEncoding= os.path.join(fl.path, r"Encoding", r"MACROMAN.ENC")
|
||||
fl.font.encoding.Load(myEncoding)
|
||||
|
||||
myDest.update()
|
||||
|
||||
myPath = myFolder + ":" + myFamilyname + "-" + myStylename + ".vfb"
|
||||
fl.font.Save(myPath)
|
||||
print myFamilyname + "-" + myStylename
|
||||
myDest.close(False)
|
||||
|
||||
|
||||
print "Done"
|
@ -0,0 +1,40 @@
|
||||
#FLM: Batch remove glyphs
|
||||
|
||||
# Paul van der Laan, 2004/10/25
|
||||
|
||||
|
||||
from robofab.interface.all.dialogs import GetFolder
|
||||
from robofab.world import RFont, OpenFont, CurrentFont
|
||||
import os
|
||||
|
||||
myBlacklist = ("nbspace", ".notdef", ".null")
|
||||
|
||||
|
||||
# Een functie om een map met files door te zoeken op vfb files
|
||||
def collectSources(root):
|
||||
files = []
|
||||
ext = ['.vfb']
|
||||
names = os.listdir(root)
|
||||
for n in names:
|
||||
if os.path.splitext(n)[1] in ext:
|
||||
files.append(os.path.join(root, n))
|
||||
return files
|
||||
|
||||
# main loop
|
||||
mySource = GetFolder()
|
||||
if mySource is not None:
|
||||
myFiles = collectSources(mySource)
|
||||
for myFile in myFiles:
|
||||
myrfFont = None
|
||||
try:
|
||||
myrfFont = OpenFont(myFile)
|
||||
for myGlyph in myBlacklist:
|
||||
if myrfFont.has_key(myGlyph):
|
||||
myrfFont.removeGlyph(myGlyph)
|
||||
print myGlyph, "removed from", myrfFont.info.familyName + "-" + myrfFont.info.styleName
|
||||
myrfFont.update()
|
||||
myrfFont.save()
|
||||
finally:
|
||||
if myrfFont is not None:
|
||||
myrfFont.close(False)
|
||||
print "Done"
|
@ -0,0 +1,44 @@
|
||||
#FLM: Batch save as font info name
|
||||
|
||||
# Paul van der Laan, 2005/01/10
|
||||
|
||||
|
||||
|
||||
from robofab.interface.all.dialogs import GetFolder
|
||||
from robofab.world import RFont, OpenFont, CurrentFont
|
||||
import os
|
||||
|
||||
|
||||
# Een functie om een map met files door te zoeken op vfb files
|
||||
def collectSources(root):
|
||||
files = []
|
||||
ext = ['.vfb']
|
||||
names = os.listdir(root)
|
||||
for n in names:
|
||||
if os.path.splitext(n)[1] in ext:
|
||||
files.append(os.path.join(root, n))
|
||||
return files
|
||||
|
||||
|
||||
|
||||
# main loop
|
||||
mySource = GetFolder()
|
||||
|
||||
if mySource is not None:
|
||||
myFiles = collectSources(mySource)
|
||||
|
||||
for myFile in myFiles:
|
||||
myFont = None
|
||||
try:
|
||||
myFont = OpenFont(myFile)
|
||||
myFamilyname = myFont.info.familyName
|
||||
myStylename = myFont.info.styleName
|
||||
myPath = mySource + ":" + myFamilyname + "-" + myStylename + ".vfb"
|
||||
fl.font.Save(myPath)
|
||||
print myFamilyname + "-" + myStylename
|
||||
|
||||
finally:
|
||||
if myFont is not None:
|
||||
myFont.close(False)
|
||||
|
||||
print "Done"
|
@ -0,0 +1,78 @@
|
||||
#FLM: Batch win rename Flex
|
||||
|
||||
# Paul van der Laan, 2004/09/13
|
||||
|
||||
|
||||
|
||||
from robofab.interface.all.dialogs import GetFolder
|
||||
from robofab.world import RFont, OpenFont, CurrentFont
|
||||
import os
|
||||
|
||||
|
||||
# Een functie om een map met files door te zoeken op vfb files
|
||||
def collectSources(root):
|
||||
files = []
|
||||
ext = ['.vfb']
|
||||
names = os.listdir(root)
|
||||
for n in names:
|
||||
if os.path.splitext(n)[1] in ext:
|
||||
files.append(os.path.join(root, n))
|
||||
return files
|
||||
|
||||
|
||||
|
||||
# Rename
|
||||
def renameFont(f, myDest):
|
||||
if f.info.fontName:
|
||||
|
||||
f.info.fontStyle=64
|
||||
|
||||
myStylename = f.info.styleName
|
||||
if "Italic" in myStylename:
|
||||
myStylename = myStylename.replace("Italic", "")
|
||||
f.info.fontstyle = 1
|
||||
|
||||
myFamilyname = f.info.familyName +
|
||||
|
||||
myStylename = "Regular"
|
||||
if f.info.fontStyle == 1: myStylename = "Italic"
|
||||
|
||||
f.info.familyName = myFamilyname
|
||||
# f.info.fontStyle = myFontstyle
|
||||
f.info.styleName = myStylename
|
||||
f.info.fontName = myFamilyname + "-" + myStylename
|
||||
f.info.fullName = myFamilyname + " " + myStylename
|
||||
f.info.menuName = myFamilyname
|
||||
f.info.fondName = myFamilyname
|
||||
|
||||
font = fl.font
|
||||
font.weight = "Regular"
|
||||
font.weight_code = 400
|
||||
font.width = "Medium (normal)"
|
||||
|
||||
f.update()
|
||||
|
||||
myPath = myDest + ":" + myFamilyname + "-" + myStylename + ".vfb"
|
||||
fl.font.Save(myPath)
|
||||
print myFamilyname + "-" + myStylename
|
||||
|
||||
|
||||
|
||||
# main loop
|
||||
mySource = GetFolder()
|
||||
myDest = GetFolder()
|
||||
|
||||
if mySource is not None:
|
||||
myFiles = collectSources(mySource)
|
||||
|
||||
for myFile in myFiles:
|
||||
myFont = None
|
||||
try:
|
||||
myFont = OpenFont(myFile)
|
||||
renameFont(myFont, myDest)
|
||||
|
||||
finally:
|
||||
if myFont is not None:
|
||||
myFont.close(False)
|
||||
|
||||
print "Done"
|
@ -0,0 +1,88 @@
|
||||
#FLM: Batch win rename Kievit
|
||||
|
||||
# Paul van der Laan, 2004/09/13
|
||||
|
||||
|
||||
|
||||
from robofab.interface.all.dialogs import GetFolder
|
||||
from robofab.world import RFont, OpenFont, CurrentFont
|
||||
import os
|
||||
|
||||
|
||||
# Een functie om een map met files door te zoeken op vfb files
|
||||
def collectSources(root):
|
||||
files = []
|
||||
ext = ['.vfb']
|
||||
names = os.listdir(root)
|
||||
for n in names:
|
||||
if os.path.splitext(n)[1] in ext:
|
||||
files.append(os.path.join(root, n))
|
||||
return files
|
||||
|
||||
|
||||
|
||||
# Rename
|
||||
def renameFont(f, myDest):
|
||||
if f.info.fontName:
|
||||
|
||||
f.info.fontStyle=64
|
||||
myStylename="Regular"
|
||||
|
||||
myStyle = f.info.styleName
|
||||
if "Italic" in myStyle:
|
||||
myStyle = myStyle.replace("Italic", "")
|
||||
myStylename = "Italic"
|
||||
f.info.fontStyle = 1
|
||||
|
||||
myFamilyname = f.info.familyName + myStyle
|
||||
|
||||
f.info.familyName = myFamilyname
|
||||
f.info.styleName = myStylename
|
||||
f.info.fontName = myFamilyname + "-" + myStylename
|
||||
f.info.fullName = myFamilyname + " " + myStylename
|
||||
f.info.menuName = myFamilyname
|
||||
f.info.fondName = myFamilyname
|
||||
|
||||
font = fl.font
|
||||
font.width = "Medium (normal)"
|
||||
font.tt_version = "Version 1.000 2001 initial release"
|
||||
font.tt_u_id = "INVD: " + myFamilyname + " " + myStylename + ": 2001"
|
||||
font.vendor = "INVD"
|
||||
myFont.panose[0] = 2
|
||||
myFont.panose[1] = 11
|
||||
myFont.panose[2] = 0
|
||||
myFont.panose[3] = 0
|
||||
myFont.panose[4] = 0
|
||||
myFont.panose[5] = 0
|
||||
myFont.panose[6] = 0
|
||||
myFont.panose[7] = 0
|
||||
myFont.panose[8] = 0
|
||||
myFont.panose[9] = 0
|
||||
font.ms_id = 2
|
||||
|
||||
f.update()
|
||||
|
||||
myPath = myDest + ":" + myFamilyname + "-" + myStylename + ".vfb"
|
||||
fl.font.Save(myPath)
|
||||
print myFamilyname + "-" + myStylename
|
||||
|
||||
|
||||
|
||||
# main loop
|
||||
mySource = GetFolder()
|
||||
myDest = GetFolder()
|
||||
|
||||
if mySource is not None:
|
||||
myFiles = collectSources(mySource)
|
||||
|
||||
for myFile in myFiles:
|
||||
myFont = None
|
||||
try:
|
||||
myFont = OpenFont(myFile)
|
||||
renameFont(myFont, myDest)
|
||||
|
||||
finally:
|
||||
if myFont is not None:
|
||||
myFont.close(False)
|
||||
|
||||
print "Done"
|
@ -0,0 +1,80 @@
|
||||
#FLM: Batch win rename Lexicon
|
||||
|
||||
# Paul van der Laan, 2004/09/13
|
||||
|
||||
|
||||
|
||||
from robofab.interface.all.dialogs import GetFolder
|
||||
from robofab.world import RFont, OpenFont, CurrentFont
|
||||
import os
|
||||
|
||||
|
||||
# Een functie om een map met files door te zoeken op vfb files
|
||||
def collectSources(root):
|
||||
files = []
|
||||
ext = ['.vfb']
|
||||
names = os.listdir(root)
|
||||
for n in names:
|
||||
if os.path.splitext(n)[1] in ext:
|
||||
files.append(os.path.join(root, n))
|
||||
return files
|
||||
|
||||
|
||||
|
||||
# Rename
|
||||
def renameFont(f, myDest):
|
||||
if f.info.fontName:
|
||||
myMenuname = f.info.menuName
|
||||
|
||||
myFamilyname = myMenuname[:11]
|
||||
myStylename = myMenuname[11:]
|
||||
if myStylename == "Sc":
|
||||
myStylename = "SC"
|
||||
|
||||
if f.info.styleName:
|
||||
if f.info.styleName == "Regular":
|
||||
myStylename = "Roman" + myStylename
|
||||
myFontstyle = 64
|
||||
else:
|
||||
myStylename = f.info.styleName + myStylename
|
||||
myFontstyle = 1
|
||||
|
||||
f.info.familyName = myFamilyname
|
||||
f.info.fontStyle = myFontstyle
|
||||
f.info.styleName = myStylename
|
||||
f.info.fontName = myFamilyname + "-" + myStylename
|
||||
f.info.fullName = myFamilyname + " " + myStylename
|
||||
f.info.menuName = myFamilyname
|
||||
f.info.fondName = myFamilyname
|
||||
|
||||
font = fl.font
|
||||
font.weight = "Regular"
|
||||
font.weight_code = 400
|
||||
font.width = "Medium (normal)"
|
||||
|
||||
f.update()
|
||||
|
||||
myPath = myDest + ":" + myFamilyname + "-" + myStylename + ".vfb"
|
||||
fl.font.Save(myPath)
|
||||
print myFamilyname + "-" + myStylename
|
||||
|
||||
|
||||
|
||||
# main loop
|
||||
mySource = GetFolder()
|
||||
myDest = GetFolder()
|
||||
|
||||
if mySource is not None:
|
||||
myFiles = collectSources(mySource)
|
||||
|
||||
for myFile in myFiles:
|
||||
myFont = None
|
||||
try:
|
||||
myFont = OpenFont(myFile)
|
||||
renameFont(myFont, myDest)
|
||||
|
||||
finally:
|
||||
if myFont is not None:
|
||||
myFont.close(False)
|
||||
|
||||
print "Done"
|
@ -0,0 +1,11 @@
|
||||
from robofab.world import CurrentFont
|
||||
|
||||
myFont = CurrentFont()
|
||||
|
||||
myGlyphs = ['Amacron', 'amacron', 'Aogonek', 'aogonek', 'Ccaron', 'ccaron', 'Cacute', 'cacute', 'Zacute', 'zacute', 'Dcaron', 'dcaron', 'Emacron', 'emacron', 'Edotaccent', 'edotaccent', 'Ecaron', 'ecaron', 'Eogonek', 'eogonek', 'gcommaaccent', 'Iogonek', 'iogonek', 'Imacron', 'imacron', 'Kcommaaccent', 'Lcommaaccent', 'lcommaaccent', 'Lcaron', 'lcaron', 'Lacute', 'lacute', 'Ncommaaccent', 'ncommaaccent', 'Nacute', 'nacute', 'Ncaron', 'ncaron', 'Ohungarumlaut', 'ohungarumlaut', 'Omacron', 'omacron', 'Racute', 'racute', 'Rcaron', 'rcaron', 'Rcommaaccent', 'rcommaaccent', 'Sacute', 'sacute', 'Tcaron', 'tcaron', 'Umacron', 'umacron', 'Uring', 'uring', 'Uhungarumlaut', 'uhungarumlaut', 'Uogonek', 'uogonek', 'kcommaaccent', 'Zdotaccent', 'zdotaccent', 'Gcommaaccent', 'commaaccent', 'Abreve', 'Scedilla', 'abreve', 'scedilla', 'Tcommaaccent', 'tcommaaccent', 'Gbreve', 'gbreve', 'Idotaccent', 'Dcroat', 'dcroat', 'Scommaaccent', 'scommaaccent', 'uni021A', 'uni021B']
|
||||
|
||||
for myGlyph in myGlyphs:
|
||||
if not myFont.has_key(myGlyph):
|
||||
myFont.newGlyph(myGlyph)
|
||||
myFont.update()
|
||||
print "done"
|
@ -0,0 +1,19 @@
|
||||
#FLM: Add remove .sc in selected glyphnames
|
||||
|
||||
from robofab.world import CurrentFont
|
||||
from robofab.interface.all.dialogs import ProgressBar
|
||||
|
||||
myFont = CurrentFont()
|
||||
|
||||
myGlyphs = myFont.selection
|
||||
|
||||
myBar = ProgressBar('Changing names...', len(myGlyphs))
|
||||
for myGlyph in myGlyphs:
|
||||
if myFont[myGlyph].name[-3:] == '.sc':
|
||||
myFont[myGlyph].name = myFont[myGlyph].name[:-3]
|
||||
else:
|
||||
myFont[myGlyph].name += '.sc'
|
||||
myFont[myGlyph].update()
|
||||
myBar.tick()
|
||||
myBar.close()
|
||||
print "done"
|
@ -0,0 +1,8 @@
|
||||
from robofab.world import CurrentGlyph
|
||||
|
||||
myGlyph = CurrentGlyph()
|
||||
|
||||
print len(myGlyph)
|
||||
|
||||
for myPoint in myGlyph[0].bPoints:
|
||||
print myPoint.anchor
|
@ -0,0 +1,3 @@
|
||||
from robofab.world import CurrentFont
import os
encfilename= os.path.join(fl.path, r"Encoding", r"WINCE.ENC")
f = CurrentFont()
f.info.fondID = 30915
f.naked().encoding.Load(encfilename)
f.naked().ttinfo.os2_ul_code_page_range1 = 2
|
||||
# 1= Latin 1
# 2= Latin 2
f.naked().ttinfo.os2_ul_code_page_range2 = 67108864
f.naked().ms_charset = 238
|
||||
# Win ANSI=0
# 1252 Latin 2=238
f.update()
print f.info.fullName
|
@ -0,0 +1,19 @@
|
||||
|
||||
from robofab.world import SelectFont, CurrentFont
|
||||
from robofab.interface.all.dialogs import ProgressBar
|
||||
|
||||
mySource = SelectFont('Select source font:')
|
||||
if mySource:
|
||||
myDest = SelectFont('Select destination font:')
|
||||
if myDest:
|
||||
for myGlyph in mySource:
|
||||
myGlyphname=myGlyph.name
|
||||
if len(mySource[myGlyphname].anchors) > 0:
|
||||
myDestglyph = myDest[myGlyphname]
|
||||
if len(myDestglyph.anchors) == 0:
|
||||
myDestglyph.appendAnchor("nieuw", (50, 50))
|
||||
myDestglyph.anchors[0].name = myGlyph.anchors[0].name
|
||||
myDestglyph.anchors[0].x = myGlyph.anchors[0].x
|
||||
myDestglyph.anchors[0].y = myGlyph.anchors[0].y
|
||||
myDestglyph.mark = 26
|
||||
myDestglyph.update()
|
@ -0,0 +1,12 @@
|
||||
|
||||
|
||||
from robofab.world import CurrentFont
|
||||
|
||||
myFont = CurrentFont()
|
||||
|
||||
for myGlyph in myFont:
|
||||
myGlyphname = myGlyph.name
|
||||
if myGlyph.mark == 0:
|
||||
myFont.removeGlyph(myGlyphname)
|
||||
myFont.update()
|
||||
print "done"
|
15
Documentation/TypoTechnica 2005/scripts Folder/Paulus - bricks/encoding.py
Executable file
15
Documentation/TypoTechnica 2005/scripts Folder/Paulus - bricks/encoding.py
Executable file
@ -0,0 +1,15 @@
|
||||
from robofab.world import CurrentFont
|
||||
|
||||
myFont = fl.font
|
||||
myrfFont = CurrentFont()
|
||||
myEncoding = myFont.encoding
|
||||
|
||||
print
|
||||
for myItem in range (0, len(myEncoding)):
|
||||
if myFont.FindGlyph(myEncoding[myItem].name) is not -1:
|
||||
# print myItem, myEncoding[myItem].name, hex(myEncoding[myItem].unicode)
|
||||
myGlyphname = myEncoding[myItem].name
|
||||
myGlyph = myrfFont[myGlyphname]
|
||||
print myItem, myGlyphname, myGlyph.unicode
|
||||
print
|
||||
|
@ -0,0 +1,6 @@
|
||||
import os.path
|
||||
encfilename= os.path.join(fl.path, r"Encoding", r"MACROMAN.ENC")
|
||||
|
||||
font = fl.font
|
||||
font.encoding.Load(encfilename)
|
||||
fl.UpdateFont()
|
18
Documentation/TypoTechnica 2005/scripts Folder/Paulus - bricks/glyph.py
Executable file
18
Documentation/TypoTechnica 2005/scripts Folder/Paulus - bricks/glyph.py
Executable file
@ -0,0 +1,18 @@
|
||||
from robofab.world import CurrentGlyph, CurrentFont
|
||||
|
||||
myFont = CurrentFont()
|
||||
# myGlyph = CurrentGlyph()
|
||||
|
||||
myDict = {"fi": ["f", "i"], "fl": ["f", "l"]}
|
||||
|
||||
for myLig in myDict:
|
||||
for myBasechar in myDict[myLig]:
|
||||
print myLig, myBasechar
|
||||
|
||||
|
||||
mySource = myFont["f"]
|
||||
myDest = myFont["e"]
|
||||
|
||||
myDest.appendGlyph(mySource)
|
||||
|
||||
myDest.update()
|
@ -0,0 +1,4 @@
|
||||
myGlyph = fl.glyph
|
||||
|
||||
myGlyph.hhints.append(Hint(-124,48))
|
||||
fl.UpdateGlyph(-1)
|
@ -0,0 +1,18 @@
|
||||
|
||||
# deletes horizontal hint with position -135 in all glyphs
|
||||
|
||||
# myGlyph = fl.glyph
|
||||
|
||||
myFont = fl.font
|
||||
myGlyphs = fl.font.glyphs
|
||||
|
||||
for g in range (0,len(myGlyphs)):
|
||||
myGlyph = myFont[g]
|
||||
myHints = myGlyph.hhints
|
||||
for h in range(0,len(myHints)):
|
||||
# print myGlyph, len(myHints)
|
||||
if myHints[h].position == -124:
|
||||
del myHints[h]
|
||||
fl.UpdateGlyph(-1)
|
||||
break
|
||||
print "done"
|
22
Documentation/TypoTechnica 2005/scripts Folder/Paulus - bricks/hints.py
Executable file
22
Documentation/TypoTechnica 2005/scripts Folder/Paulus - bricks/hints.py
Executable file
@ -0,0 +1,22 @@
|
||||
myFont = fl.font
|
||||
|
||||
print "Blue fuzz", myFont.blue_fuzz[0]
|
||||
print "Blue scale", myFont.blue_scale[0]
|
||||
print "Blue shift", myFont.blue_shift[0]
|
||||
print "Number of blue values", myFont.blue_values_num
|
||||
print "Blue values", myFont.blue_values[0]
|
||||
|
||||
print "Number of other blues", myFont.other_blues_num
|
||||
print "Other blues", myFont.other_blues[0]
|
||||
|
||||
print "Number of family blues", myFont.family_blues_num
|
||||
print "Family blues", myFont.family_blues[0]
|
||||
|
||||
print "Number of other family blues", myFont.family_other_blues_num
|
||||
print "Other family blues", myFont.family_other_blues[0]
|
||||
|
||||
print "Force bold", myFont.force_bold[0]
|
||||
print "Number of horizontal stems", myFont.stem_snap_h_num
|
||||
print "Horizontal stems", myFont.stem_snap_h[0]
|
||||
print "Number of vertical stems", myFont.stem_snap_v_num
|
||||
print "Vertical stems", myFont.stem_snap_v[0]
|
@ -0,0 +1,23 @@
|
||||
# principe van gewichten a -- b -- c
|
||||
|
||||
def interPola(b,c):
|
||||
a = b**2.0/c
|
||||
return a
|
||||
|
||||
def interPolb(a,c):
|
||||
b = (a*c)**.5
|
||||
return b
|
||||
|
||||
def interPolc(a,b):
|
||||
c = b**2.0/a
|
||||
return c
|
||||
|
||||
print
|
||||
for n in range(0,100):
|
||||
c = interPolb(66,66+n)
|
||||
d = interPolb(c,166)
|
||||
|
||||
print 66+n,d
|
||||
|
||||
print interPolb(66,122)
|
||||
print interPolc(66,90)
|
@ -0,0 +1,9 @@
|
||||
stems = [85, 106, 133,152]
|
||||
|
||||
minstem = 73.0
|
||||
maxstem = 180.0
|
||||
|
||||
print ""
|
||||
for stem in stems:
|
||||
print 100/(maxstem-minstem) * (stem-minstem)
|
||||
print ""
|
@ -0,0 +1,20 @@
|
||||
from robofab.world import SelectFont, CurrentFont
|
||||
from robofab.interface.all.dialogs import ProgressBar
|
||||
|
||||
myFactor = .36
|
||||
|
||||
myMin = SelectFont('Select source font one:')
|
||||
if myMin:
|
||||
myMax = SelectFont('Select source font two:')
|
||||
if myMax:
|
||||
myDest = SelectFont('Select destination font:')
|
||||
if myDest:
|
||||
myMinkern = myMin.kerning
|
||||
myMaxkern = myMax.kerning
|
||||
myDestkern = myDest.kerning
|
||||
|
||||
myDestkern.interpolate(myMinkern,myMaxkern,myFactor,clearExisting=True)
|
||||
|
||||
myDest.update()
|
||||
|
||||
print "Done"
|
@ -0,0 +1,9 @@
|
||||
from robofab.world import CurrentFont
|
||||
|
||||
myFont = CurrentFont()
|
||||
myKerning = myFont.kerning
|
||||
|
||||
for myPair in myKerning:
|
||||
myComb = str(myPair).split()
|
||||
myComb = "%s %s" %(myComb[0][2:-2], myComb[1][1:-2])
|
||||
print myComb,myKerning[myPair]
|
20
Documentation/TypoTechnica 2005/scripts Folder/Paulus - bricks/ligatures.py
Executable file
20
Documentation/TypoTechnica 2005/scripts Folder/Paulus - bricks/ligatures.py
Executable file
@ -0,0 +1,20 @@
|
||||
from robofab.world import CurrentGlyph, CurrentFont
|
||||
|
||||
myFont = CurrentFont()
|
||||
# myGlyph = CurrentGlyph()
|
||||
|
||||
myDict = {"fi": ["f", "i"], "fl": ["f", "l"]}
|
||||
|
||||
for myLig in myDict:
|
||||
for myBasechar in myDict[myLig]:
|
||||
myDest = myFont[myLig]
|
||||
mySource = myFont[myBasechar]
|
||||
myDest.appendGlyph(mySource)
|
||||
myWidth = mySource.width
|
||||
for contour in myDest.contours:
|
||||
contour.move((-myWidth, 0))
|
||||
|
||||
myDest.leftMargin = myFont[myDict[myLig][0]].leftMargin
|
||||
myDest.rightMargin = myFont[myDict[myLig][-1]].rightMargin
|
||||
|
||||
myDest.update()
|
9
Documentation/TypoTechnica 2005/scripts Folder/Paulus - bricks/mark.py
Executable file
9
Documentation/TypoTechnica 2005/scripts Folder/Paulus - bricks/mark.py
Executable file
@ -0,0 +1,9 @@
|
||||
from robofab.world import CurrentFont
|
||||
|
||||
myFont = CurrentFont()
|
||||
|
||||
mySel = myFont.selection
|
||||
|
||||
for myGlyph in mySel:
|
||||
myFont[myGlyph].mark = 12
|
||||
myFont.update()
|
@ -0,0 +1,21 @@
|
||||
# Een functie om een map met files door te zoeken op vfb files
|
||||
|
||||
def collectSources(root):
|
||||
files = []
|
||||
ext = ['.vfb']
|
||||
names = os.listdir(root)
|
||||
for n in names:
|
||||
if os.path.splitext(n)[1] in ext:
|
||||
files.append(os.path.join(root, n))
|
||||
return files
|
||||
|
||||
# dialog voor het selecteren van een folder
|
||||
f = GetFolder()
|
||||
|
||||
if f is not None:
|
||||
paths = collectSources(f)
|
||||
|
||||
for f in paths:
|
||||
font = None
|
||||
try:
|
||||
font = OpenFont(f)
|
1
Documentation/TypoTechnica 2005/scripts Folder/Paulus - bricks/pen.py
Executable file
1
Documentation/TypoTechnica 2005/scripts Folder/Paulus - bricks/pen.py
Executable file
@ -0,0 +1 @@
|
||||
from robofab.world import CurrentGlyph
myGlyph = CurrentGlyph()
myPen = myGlyph.getPen()
myPen.moveTo((-10,0))
myPen.lineTo((500,0))
myPen.lineTo((500,50))
myPen.lineTo((-10,50))
myPen.lineTo((-10,0))
myPen.closePath()
myGlyph.update()
|
@ -0,0 +1,10 @@
|
||||
#FLM: Remove overlap
|
||||
|
||||
myFont = fl.font
|
||||
myGlyphs = fl.font.glyphs
|
||||
|
||||
for g in range (0,len(myGlyphs)):
|
||||
myGlyph = myFont[g]
|
||||
myGlyph.RemoveOverlap()
|
||||
fl.UpdateGlyph(-1)
|
||||
print "done"
|
@ -0,0 +1,7 @@
|
||||
|
||||
path = "OS X:Users:paulus:Desktop:testfile.txt"
|
||||
|
||||
f = open(path, "r+")
|
||||
f.seek(0,2)
|
||||
f.write("hello!\tjajaja!\ren nu.")
|
||||
f.close()
|
4
Documentation/TypoTechnica 2005/scripts Folder/Paulus - bricks/save.py
Executable file
4
Documentation/TypoTechnica 2005/scripts Folder/Paulus - bricks/save.py
Executable file
@ -0,0 +1,4 @@
|
||||
|
||||
font = fl.font
|
||||
myPath = "Mac OS X:Users:paulus:Desktop:" + "test.vfb"
|
||||
font.Save(myPath)
|
12
Documentation/TypoTechnica 2005/scripts Folder/Paulus - bricks/scale.py
Executable file
12
Documentation/TypoTechnica 2005/scripts Folder/Paulus - bricks/scale.py
Executable file
@ -0,0 +1,12 @@
|
||||
from robofab.world import CurrentFont, CurrentGlyph
|
||||
|
||||
myFont = CurrentFont()
|
||||
# myGlyph = CurrentGlyph()
|
||||
|
||||
mySelection=['Eth', 'Lslash', 'Scaron', 'Yacute', 'Thorn', 'Zcaron', 'dollar', 'percent', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'Adieresis', 'Aring', 'Ccedilla', 'Eacute', 'Ntilde', 'Odieresis', 'Udieresis', 'cent', 'sterling', 'AE', 'Oslash', 'yen', 'florin', 'Agrave', 'Atilde', 'Otilde', 'OE', 'Ydieresis', 'currency', 'perthousand', 'Acircumflex', 'Ecircumflex', 'Aacute', 'Edieresis', 'Egrave', 'Iacute', 'Icircumflex', 'Idieresis', 'Igrave', 'Oacute', 'Ocircumflex', 'Ograve', 'Uacute', 'Ucircumflex', 'Ugrave']
|
||||
|
||||
for myGlyph in mySelection:
|
||||
myFont[myGlyph].scale((1,0.9), center=(0,0))
|
||||
myFont[myGlyph].mark = 26
|
||||
|
||||
myFont.update()
|
29
Documentation/TypoTechnica 2005/scripts Folder/Paulus - bricks/selection.py
Executable file
29
Documentation/TypoTechnica 2005/scripts Folder/Paulus - bricks/selection.py
Executable file
@ -0,0 +1,29 @@
|
||||
from robofab.world import CurrentFont
|
||||
|
||||
myFont = CurrentFont()
|
||||
print myFont.selection
|
||||
|
||||
# latin-1 accented
|
||||
# myFont.selection = ['Scaron', 'scaron', 'Yacute', 'yacute', 'Zcaron', 'zcaron', 'Adieresis', 'Aring', 'Ccedilla', 'Eacute', 'Ntilde', 'Odieresis', 'Udieresis', 'aacute', 'agrave', 'acircumflex', 'adieresis', 'atilde', 'aring', 'ccedilla', 'eacute', 'egrave', 'ecircumflex', 'edieresis', 'iacute', 'igrave', 'icircumflex', 'idieresis', 'ntilde', 'oacute', 'ograve', 'ocircumflex', 'odieresis', 'otilde', 'uacute', 'ugrave', 'ucircumflex', 'udieresis', 'Agrave', 'Atilde', 'Otilde', 'ydieresis', 'Ydieresis', 'Acircumflex', 'Ecircumflex', 'Aacute', 'Edieresis', 'Egrave', 'Iacute', 'Icircumflex', 'Idieresis', 'Igrave', 'Oacute', 'Ocircumflex', 'Ograve', 'Uacute', 'Ucircumflex', 'Ugrave']
|
||||
|
||||
# accents
|
||||
# myFont.selection = ['grave', 'acute', 'dieresis', 'circumflex', 'tilde', 'macron', 'breve', 'dotaccent', 'ring', 'cedilla', 'hungarumlaut', 'ogonek', 'caron']
|
||||
|
||||
# latin-2 accented
|
||||
# myFont.selection = ['Amacron', 'amacron', 'Aogonek', 'aogonek', 'Ccaron', 'ccaron', 'Cacute', 'cacute', 'Zacute', 'zacute', 'Dcaron', 'dcaron', 'Emacron', 'emacron', 'Edotaccent', 'edotaccent', 'Ecaron', 'ecaron', 'Eogonek', 'eogonek', 'gcommaaccent', 'Iogonek', 'iogonek', 'Imacron', 'imacron', 'Kcommaaccent', 'Lcommaaccent', 'lcommaaccent', 'Lcaron', 'lcaron', 'Lacute', 'lacute', 'Ncommaaccent', 'ncommaaccent', 'Nacute', 'nacute', 'Ncaron', 'ncaron', 'Ohungarumlaut', 'ohungarumlaut', 'Omacron', 'omacron', 'Racute', 'racute', 'Rcaron', 'rcaron', 'Rcommaaccent', 'rcommaaccent', 'Sacute', 'sacute', 'Tcaron', 'tcaron', 'Umacron', 'umacron', 'Uring', 'uring', 'Uhungarumlaut', 'uhungarumlaut', 'Uogonek', 'uogonek', 'kcommaaccent', 'Zdotaccent', 'zdotaccent', 'Gcommaaccent', 'Abreve', 'Scedilla', 'abreve', 'scedilla', 'Tcommaaccent', 'tcommaaccent', 'Gbreve', 'gbreve', 'Idotaccent', 'Scommaaccent', 'scommaaccent', 'uni021A', 'uni021B']
|
||||
|
||||
# latin-2 additional
|
||||
# myFont.selection = ['commaaccent', 'Dcroat', 'dcroat']
|
||||
|
||||
# uc top
|
||||
# myFont.selection = ['A', 'C', 'D', 'E', 'G', 'I', 'L', 'N', 'O', 'R', 'S', 'T', 'U', 'Y', 'Z']
|
||||
|
||||
# lc top
|
||||
# myFont.selection = ['a', 'c', 'e', 'g', 'l', 'n', 'o', 'r', 's', 'u', 'y', 'z', 'dotlessi']
|
||||
|
||||
# bottom
|
||||
# myFont.selection = ['A', 'C', 'E', 'G', 'I', 'K', 'L', 'N', 'O', 'R', 'S', 'T', 'U', 'a', 'c', 'e', 'i', 'k', 'l', 'n', 'o', 'r', 's', 't', 'u']
|
||||
|
||||
# right
|
||||
# myFont.selection = ['L', 'd', 'l', 't']
|
||||
|
20
Documentation/TypoTechnica 2005/scripts Folder/Paulus - bricks/unicode 2.py
Executable file
20
Documentation/TypoTechnica 2005/scripts Folder/Paulus - bricks/unicode 2.py
Executable file
@ -0,0 +1,20 @@
|
||||
from robofab.world import CurrentFont
|
||||
|
||||
myFont = CurrentFont()
|
||||
myflFont = fl.font
|
||||
myEncoding = myflFont.encoding
|
||||
|
||||
myList = [""] * len(myEncoding)
|
||||
|
||||
print ""
|
||||
for myGlyph in myFont:
|
||||
myGlyphname = myGlyph.name
|
||||
myIndex = myEncoding.FindName(myGlyphname)
|
||||
if myIndex is not -1:
|
||||
myList[myIndex] = myGlyph.unicode
|
||||
|
||||
for myItem in range (0, len(myList)):
|
||||
if myList[myItem] is not "":
|
||||
myHex = hex(myItem)[-2:]
|
||||
myHex = myHex.replace("x", "0")
|
||||
print "\u" + str(myList[myItem]) + "\\'" + myHex
|
@ -0,0 +1 @@
|
||||
from robofab.world import CurrentFont
myFont = CurrentFont()
myflFont = fl.font
myEncoding = myflFont.encoding
print ""
for myGlyph in myFont:
myGlyphname = myGlyph.name
myIndex = myEncoding.FindName(myGlyphname)
print "\u" + str(myGlyph.unicode) + "\\'" + (hex(myIndex)[-2:])
print "done"
|
@ -0,0 +1 @@
|
||||
#FLM: Auto starting points
from robofab.world import CurrentFont
from robofab.interface.all.dialogs import ProgressBar
f = CurrentFont()
tickCount = len(f)
bar = ProgressBar("Setting start points...", tickCount)
tick = 0
for c in f:
if c:
bar.label(c.name)
bar.tick(tick)
c.correctDirection()
c.autoContourOrder()
for contour in c:
contour.autoStartSegment()
tick = tick + 1
bar.close()
f.update()
print 'done'
|
@ -0,0 +1,16 @@
|
||||
#FLM: Build accents for selected glyphs
|
||||
|
||||
from robofab.world import CurrentFont
|
||||
from robofab.interface.all.dialogs import ProgressBar
|
||||
|
||||
myFont = CurrentFont()
|
||||
|
||||
myGlyphs = myFont.selection
|
||||
|
||||
myBar = ProgressBar('Building accents...', len(myGlyphs))
|
||||
for myGlyph in myGlyphs:
|
||||
myFont.generateGlyph(myGlyph, replace=True, printErrors=True)
|
||||
myFont[myGlyph].update()
|
||||
myBar.tick()
|
||||
myBar.close()
|
||||
print "done"
|
@ -0,0 +1,21 @@
|
||||
#FLM: Compare glyphs by width
|
||||
|
||||
from robofab.world import SelectFont, CurrentFont
|
||||
from robofab.interface.all.dialogs import ProgressBar
|
||||
|
||||
myFont = CurrentFont()
|
||||
myComparison = SelectFont("Select comparison font")
|
||||
|
||||
if myComparison is not None:
|
||||
bar = ProgressBar('Comparing fonts...', len(myFont))
|
||||
for myChar in myFont:
|
||||
myCharname = myChar.name
|
||||
if myComparison.has_key(myCharname):
|
||||
if myChar.width <> myComparison[myCharname].width:
|
||||
myFont[myCharname].mark = 26
|
||||
bar.tick()
|
||||
|
||||
myFont.update()
|
||||
bar.close()
|
||||
|
||||
# mark: red=1, blue=170, green=80, magenta=210, cyan=130
|
@ -0,0 +1,26 @@
|
||||
#FLM: Construct ligatures based on dictionary
|
||||
|
||||
from robofab.world import CurrentFont
|
||||
|
||||
myFont = CurrentFont()
|
||||
|
||||
# myDict = {"fi": ["f", "i"], "fl": ["f", "l"]}
|
||||
myDict = {"P": ["X", "Z"], "Q": ["Y", "Z"]}
|
||||
# myDict = {"fi": ["f", "i"], "fl": ["f", "l"], "germandbls": ["s", "s"]}
|
||||
# myDict = {"g": ["H", "f"], "h": ["H", "F"], "j": ["H", "I"], "K": ["H", "H"]}
|
||||
|
||||
for myLig in myDict:
|
||||
for myBasechar in myDict[myLig]:
|
||||
myDest = myFont[myLig]
|
||||
mySource = myFont[myBasechar]
|
||||
myDest.appendGlyph(mySource)
|
||||
myWidth = mySource.width
|
||||
for contour in myDest.contours:
|
||||
contour.move((-myWidth, 0))
|
||||
|
||||
myDest.leftMargin = myFont[myDict[myLig][0]].leftMargin
|
||||
myDest.rightMargin = myFont[myDict[myLig][-1]].rightMargin
|
||||
|
||||
myDest.update()
|
||||
|
||||
print "Done"
|
@ -0,0 +1,13 @@
|
||||
#FLM: Copy all glyphs to mask layer
|
||||
|
||||
from robofab.world import CurrentFont
|
||||
|
||||
f = CurrentFont()
|
||||
for c in f:
|
||||
|
||||
# go to the desired glyph
|
||||
fl.EditGlyph(c.index)
|
||||
|
||||
# copy the desired glyph
|
||||
fl.CallCommand(fl_cmd.MaskClear)
|
||||
fl.CallCommand(fl_cmd.MaskCopy)
|
@ -0,0 +1,20 @@
|
||||
#FLM: Copy all glyphs to other font
|
||||
|
||||
# werkt helaas nog steeds niet...
|
||||
|
||||
from robofab.world import CurrentFont, CurrentGlyph
|
||||
from robofab.interface.all.dialogs import SelectFont
|
||||
|
||||
mySource = CurrentFont()
|
||||
myDest = SelectFont('Select a destination font:')
|
||||
|
||||
if myDest:
|
||||
for myGlyph in mySource:
|
||||
myGlyphname = myGlyph.name
|
||||
if myDest.has_key(myGlyphname):
|
||||
myDest.removeGlyph(myGlyphname)
|
||||
myDest[myGlyphname].appendGlyph(mySource[myGlyphname])
|
||||
# myDest[myGlyphname].mark = 52
|
||||
myDest.update()
|
||||
|
||||
print "Done"
|
@ -0,0 +1,22 @@
|
||||
#FLM: Copy selected sidebearings from other font
|
||||
|
||||
from robofab.world import CurrentFont, SelectFont
|
||||
from robofab.interface.all.dialogs import ProgressBar
|
||||
|
||||
myDestination = CurrentFont()
|
||||
myGlyphs = myDestination.selection
|
||||
|
||||
myFont = SelectFont("Select source font")
|
||||
|
||||
if myFont is not None:
|
||||
bar = ProgressBar('Copying sidebearings...', len(myGlyphs))
|
||||
for myChar in myGlyphs:
|
||||
if myFont.has_key(myChar):
|
||||
myDestination[myChar].leftMargin = myFont[myChar].leftMargin
|
||||
myDestination[myChar].rightMargin = myFont[myChar].rightMargin
|
||||
# myDestination[myChar].width = myFont[myChar].width
|
||||
myDestination[myChar].mark = 26
|
||||
bar.tick()
|
||||
|
||||
myDestination.update()
|
||||
bar.close()
|
@ -0,0 +1,22 @@
|
||||
#FLM: Copy selected sidebearings to other font
|
||||
|
||||
from robofab.world import CurrentFont, SelectFont
|
||||
from robofab.interface.all.dialogs import ProgressBar
|
||||
|
||||
myFont = CurrentFont()
|
||||
myGlyphs = myFont.selection
|
||||
|
||||
myDestination = SelectFont("Select destination font")
|
||||
|
||||
if myDestination is not None:
|
||||
bar = ProgressBar('Copying sidebearings...', len(myGlyphs))
|
||||
for myChar in myGlyphs:
|
||||
if myDestination.has_key(myChar):
|
||||
myDestination[myChar].leftMargin = myFont[myChar].leftMargin
|
||||
# myDestination[myChar].rightMargin = myFont[myChar].rightMargin
|
||||
myDestination[myChar].width = myFont[myChar].width
|
||||
myDestination[myChar].mark = 26
|
||||
bar.tick()
|
||||
|
||||
myDestination.update()
|
||||
bar.close()
|
@ -0,0 +1,20 @@
|
||||
#FLM: Copy sidebearings to other font
|
||||
|
||||
from robofab.world import SelectFont
|
||||
from robofab.interface.all.dialogs import ProgressBar
|
||||
|
||||
mySource = SelectFont("Select source font")
|
||||
myDestination = SelectFont("Select destination font")
|
||||
|
||||
if mySource is not None and myDestination is not None:
|
||||
bar = ProgressBar('Copying sidebearings...', len(mySource))
|
||||
for myChar in mySource:
|
||||
myCharname = myChar.name
|
||||
if myDestination.has_key(myCharname):
|
||||
myDestination[myCharname].leftMargin = myChar.leftMargin
|
||||
myDestination[myCharname].rightMargin = myChar.rightMargin
|
||||
myDestination[myCharname].mark = 26
|
||||
bar.tick()
|
||||
|
||||
myDestination.update()
|
||||
bar.close()
|
@ -0,0 +1,32 @@
|
||||
#FLM: Create dummy glyphs in selection
|
||||
|
||||
from robofab.world import SelectFont, CurrentFont
|
||||
from robofab.interface.all.dialogs import ProgressBar
|
||||
|
||||
myFont = CurrentFont()
|
||||
myGlyphs = myFont.selection
|
||||
myGlyphwidth = 250
|
||||
myLines = ((100,250,50),)
|
||||
|
||||
bar = ProgressBar('Creating dummy glyphs...', len(myGlyphs))
|
||||
for myGlyph in myGlyphs:
|
||||
myFont[myGlyph].width = myGlyphwidth
|
||||
for myLine in myLines:
|
||||
myPen = myFont[myGlyph].getPen()
|
||||
myMargin = myLine[0]
|
||||
myHeight = myLine[1]
|
||||
myWeight = myLine[2]
|
||||
myStrokewidth = myGlyphwidth - myMargin
|
||||
|
||||
myPen.moveTo((myMargin,myHeight))
|
||||
myPen.lineTo((myStrokewidth,myHeight))
|
||||
myPen.lineTo((myStrokewidth,myHeight+myWeight))
|
||||
myPen.lineTo((myMargin,myHeight+myWeight))
|
||||
myPen.lineTo((myMargin,myHeight))
|
||||
myPen.closePath()
|
||||
|
||||
myFont[myGlyph].update()
|
||||
bar.tick()
|
||||
bar.close()
|
||||
myFont.update()
|
||||
print "done"
|
31
Documentation/TypoTechnica 2005/scripts Folder/Paulus - font/draw lines.py
Executable file
31
Documentation/TypoTechnica 2005/scripts Folder/Paulus - font/draw lines.py
Executable file
@ -0,0 +1,31 @@
|
||||
#FLM: Draw lines
|
||||
|
||||
from robofab.world import CurrentFont
|
||||
|
||||
# myLines = ((-10,692,57), (-10,-177,57)) # Fresco kader
|
||||
myLines = ((-5,-124,48),)
|
||||
|
||||
|
||||
myFont = CurrentFont()
|
||||
for myGlyph in myFont:
|
||||
|
||||
myGlyphwidth = myFont[myGlyph.name].width
|
||||
|
||||
for myLine in myLines:
|
||||
myPen = myGlyph.getPen()
|
||||
myMargin = myLine[0]
|
||||
myHeight = myLine[1]
|
||||
myWeight = myLine[2]
|
||||
myStrokewidth = myGlyphwidth - myMargin
|
||||
|
||||
myPen.moveTo((myMargin,myHeight))
|
||||
myPen.lineTo((myStrokewidth,myHeight))
|
||||
myPen.lineTo((myStrokewidth,myHeight+myWeight))
|
||||
myPen.lineTo((myMargin,myHeight+myWeight))
|
||||
myPen.lineTo((myMargin,myHeight))
|
||||
myPen.closePath()
|
||||
|
||||
myGlyph.update()
|
||||
|
||||
myFont.update()
|
||||
print "Done"
|
@ -0,0 +1,40 @@
|
||||
#FLM: Export glyphs naar tagged text OT
|
||||
|
||||
from robofab.world import CurrentFont
|
||||
from robofab.interface.all.dialogs import GetFolder, ProgressBar
|
||||
|
||||
mySize = 44.0
|
||||
myLeading = 48.0
|
||||
|
||||
myFont = CurrentFont()
|
||||
myFontfam = myFont.info.otFamilyName
|
||||
myFontstyle = myFont.info.otStyleName
|
||||
|
||||
myPagebreak = ""
|
||||
myPath = GetFolder()
|
||||
|
||||
if myPath:
|
||||
myPath += ":" + myFontfam + "-" + myFontstyle + ".txt"
|
||||
|
||||
myFile = open(myPath, "w")
|
||||
try:
|
||||
myFile.write("<ASCII-MAC>" + chr(10))
|
||||
myFile.write("<vsn:2.000000><fset:InDesign-Roman><ctable:=<Black:COLOR:CMYK:Process:0.000000,0.000000,0.000000,1.000000>>" + chr(10))
|
||||
|
||||
myLine = myPagebreak + "<pstyle:><ct:Regular><cs:6.000000><cl:12.000000><cf:Andale Mono>" + myFontfam + "-" + myFontstyle + " glyph overview, generated 26 10 2004<cf:><cl:><cs:><ct:>" + chr(10) + "<pstyle:><ct:Regular><cs:6.000000><cl:12.000000><cf:Andale Mono>Version " + str(myFont.info.versionMajor) + "." + str(myFont.info.versionMinor) + ", designed by " + myFont.info.designer + ", " + str(myFont.info.year) + ".<cf:><cl:><cs:><ct:>" + chr(10) + "<pstyle:><ct:Regular><cs:9.000000><cl:14.000000><cf:Andale Mono><cf:><cl:><cs:><ct:>" + chr(10) + "<pstyle:><cs:" + str(mySize) + "><cl:" + str(myLeading) + "><cf:TEFF><ct:Pi> | <ct:><cf:>"
|
||||
myFile.write(myLine)
|
||||
|
||||
myBar = ProgressBar('Exporting glyphs...', len(myFont))
|
||||
for myGlyph in range(1,len(myFont)):
|
||||
myLine = "<cf:" + myFontfam + "><ct:" + myFontstyle + "><pSG:" + str(myGlyph) + "><0xFFFD><pSG:><ct:><cf:><cf:TEFF><ct:Pi>| |<ct:><cf:>"
|
||||
myFile.write(myLine)
|
||||
myBar.tick()
|
||||
myFile.write("<cl:><cs:>")
|
||||
myPagebreak = "<cnxc:Page>"
|
||||
myFile.close()
|
||||
myBar.close()
|
||||
print "Generated glyph overview for", myFontfam + "-" + myFontstyle
|
||||
except:
|
||||
myFile.close()
|
||||
print "An error occurred"
|
||||
print "Done"
|
File diff suppressed because one or more lines are too long
@ -0,0 +1,45 @@
|
||||
#FLM: Export glyphs naar RTF
|
||||
|
||||
from robofab.world import CurrentFont
|
||||
from robofab.interface.all.dialogs import GetFolder, ProgressBar
|
||||
|
||||
mySize = 16
|
||||
myLeading = 22
|
||||
|
||||
myFont = CurrentFont()
|
||||
myflFont = fl.font
|
||||
myEncoding = myflFont.encoding
|
||||
|
||||
myFontfam = myFont.info.familyName
|
||||
myFontstyle = myFont.info.styleName
|
||||
myList = [""] * len(myEncoding)
|
||||
|
||||
myPagebreak = ""
|
||||
myPath = GetFolder()
|
||||
|
||||
if myPath:
|
||||
myPath += ":" + myFontfam + "-" + myFontstyle + ".rtf"
|
||||
|
||||
for myGlyph in myFont:
|
||||
myGlyphname = myGlyph.name
|
||||
myIndex = myEncoding.FindName(myGlyphname)
|
||||
if myIndex is not -1:
|
||||
myList[myIndex] = myGlyph.unicode
|
||||
|
||||
myFile = open(myPath, "w")
|
||||
myFile.write("{\\rtf1\\mac\\ansicpg1252" + chr(13) + "{\\fonttbl\\f0\\fnil\\cpg819 " + myFontfam + "-" + myFontstyle + ";}" + chr(13) + "\\f0\\sl-" + str(myLeading*20) + "\\fs" + str(mySize*2) + chr(13))
|
||||
|
||||
myBar = ProgressBar('Exporting glyphs...', len(myList))
|
||||
for myItem in range (0, len(myList)):
|
||||
if myList[myItem]:
|
||||
myHex = hex(myItem)[-2:]
|
||||
myHex = myHex.replace("x", "0")
|
||||
myWord = "\u" + str(myList[myItem]) + "\\'" + myHex + " "
|
||||
myFile.write(myWord)
|
||||
myBar.tick()
|
||||
myPagebreak = "\page "
|
||||
myFile.write("}")
|
||||
myFile.close()
|
||||
myBar.close()
|
||||
print "Generated glyph overview for", myFontfam + "-" + myFontstyle
|
||||
print "Done"
|
@ -0,0 +1,34 @@
|
||||
#FLM: Export kerning naar tagged text OT
|
||||
|
||||
from robofab.world import CurrentFont
|
||||
from robofab.interface.all.dialogs import GetFolder, ProgressBar
|
||||
|
||||
myFont = CurrentFont()
|
||||
myKerning = myFont.kerning
|
||||
myFontfam = myFont.info.familyName
|
||||
myFontstyle = myFont.info.styleName
|
||||
|
||||
myPath = GetFolder()
|
||||
|
||||
if myPath:
|
||||
myPath += ":" + myFontfam + "-" + myFontstyle + "_kern.txt"
|
||||
|
||||
myFile = open(myPath, "w")
|
||||
myFile.write("<ASCII-MAC>" + chr(10))
|
||||
myFile.write("<vsn:2.000000><fset:InDesign-Roman><ctable:=<Black:COLOR:CMYK:Process:0.000000,0.000000,0.000000,1.000000>>" + chr(10))
|
||||
|
||||
myBar = ProgressBar('Exporting kerning...', len(myKerning))
|
||||
for myPair in myKerning:
|
||||
myComb = str(myPair).split()
|
||||
myLeft=myComb[0][2:-2]
|
||||
myRight=myComb[1][1:-2]
|
||||
myLeftid = myFont[myLeft].index
|
||||
myRightid = myFont[myRight].index
|
||||
|
||||
myLine = "<pstyle:><pga:BaseLine><ct:" + myFontstyle + "><cs:11.000000><cl:14.100000><cf:" + myFontfam + "><pSG:" + str(myLeftid) + "><0xFFFD><pSG:><pSG:" + str(myRightid) + "><0xFFFD><pSG:><ct:><cs:><cl:><cf:><ct:Regular><cs:5.000000><cl:14.100000><cf:Andale Mono> " + str(myKerning[myPair]) + chr(10) + "<ct:><cs:><cl:><cf:><pga:>"
|
||||
myFile.write(myLine)
|
||||
myBar.tick()
|
||||
myFile.close()
|
||||
myBar.close()
|
||||
print "Generated kerning file for", myFontfam, myFontstyle
|
||||
print "Done"
|
@ -0,0 +1,37 @@
|
||||
#FLM: Export kerning naar tagged text PS
|
||||
|
||||
from robofab.world import CurrentFont
|
||||
from robofab.interface.all.dialogs import GetFolder, ProgressBar
|
||||
|
||||
myDict = {"Eth": "<0x00D0>", "eth": "<0x00F0>", "Lslash": "<0x0141>", "lslash": "<0x0142>", "Scaron": "<0x0160>", "scaron": "<0x0161>", "Yacute": "<0x00DD>", "yacute": "<0x00FD>", "Thorn": "<0x00DE>", "thorn": "<0x00FE>", "Zcaron": "<0x017D>", "zcaron": "<0x017E>", "brokenbar": "<0x00A6>", "minus": "<0x2212>", "multiply": "<0x00D7>", "space": " ", "exclam": "!", "quotedbl": "\"", "numbersign": "#", "dollar": "$", "percent": "%", "ampersand": "&", "quotesingle": "'", "parenleft": "(", "parenright": ")", "asterisk": "*", "plus": "+", "comma": ",", "hyphen": "-", "period": ".", "slash": "/", "zero": "0", "one": "1", "two": "2", "three": "3", "four": "4", "five": "5", "six": "6", "seven": "7", "eight": "8", "nine": "9", "colon": ":", "semicolon": ";", "less": "\<", "equal": "=", "greater": "\>", "question": "?", "at": "@", "A": "A", "B": "B", "C": "C", "D": "D", "E": "E", "F": "F", "G": "G", "H": "H", "I": "I", "J": "J", "K": "K", "L": "L", "M": "M", "N": "N", "O": "O", "P": "P", "Q": "Q", "R": "R", "S": "S", "T": "T", "U": "U", "V": "V", "W": "W", "X": "X", "Y": "Y", "Z": "Z", "bracketleft": "[", "backslash": "\\\\", "bracketright": "]", "asciicircum": "^", "underscore": "_", "grave": "`", "a": "a", "b": "b", "c": "c", "d": "d", "e": "e", "f": "f", "g": "g", "h": "h", "i": "i", "j": "j", "k": "k", "l": "l", "m": "m", "n": "n", "o": "o", "p": "p", "q": "q", "r": "r", "s": "s", "t": "t", "u": "u", "v": "v", "w": "w", "x": "x", "y": "y", "z": "z", "braceleft": "{", "bar": "|", "braceright": "}", "asciitilde": "~", "Adieresis": "<0x00C4><0x00C4>", "Aring": "<0x00C5>", "Ccedilla": "<0x00C7>", "Eacute": "<0x00C9>", "Ntilde": "<0x00D1>", "Odieresis": "<0x00D6>", "Udieresis": "<0x00DC>", "aacute": "<0x00E1>", "agrave": "<0x00E0>", "acircumflex": "<0x00E2>", "adieresis": "<0x00E4>", "atilde": "<0x00E3>", "aring": "<0x00E5>", "ccedilla": "<0x00E7>", "eacute": "<0x00E9>", "egrave": "<0x00E8>", "ecircumflex": "<0x00EA>", "edieresis": "<0x00EB>", "iacute": "<0x00ED>", "igrave": "<0x00EC>", "icircumflex": "<0x00EE>", "idieresis": "<0x00EF>", "ntilde": "<0x00F1>", "oacute": "<0x00F3>", "ograve": "<0x00F2>", "ocircumflex": "<0x00F4>", "odieresis": "<0x00F6>", "otilde": "<0x00F5>", "uacute": "<0x00FA>", "ugrave": "<0x00F9>", "ucircumflex": "<0x00FB>", "udieresis": "<0x00FC>", "dagger": "<0x2020>", "degree": "<0x00B0>", "cent": "<0x00A2>", "sterling": "<0x00A3>", "section": "<0x00A7>", "bullet": "<0x2022>", "paragraph": "<0x00B6>", "germandbls": "<0x00DF>", "registered": "<0x00AE>", "copyright": "<0x00A9>", "trademark": "<0x2122>", "acute": "<0x00B4>", "dieresis": "<0x00A8>", "notequal": "<0x2260>", "AE": "<0x00C6>", "Oslash": "<0x00D8>", "plusminus": "<0x00B1>", "lessequal": "<0x2264>", "greaterequal": "<0x2265>", "yen": "<0x00A5>", "ordfeminine": "<0x00AA>", "ordmasculine": "<0x00BA>", "ae": "<0x00E6>", "oslash": "<0x00F8>", "questiondown": "<0x00BF>", "exclamdown": "<0x00A1>", "florin": "<0x0192>", "guillemotleft": "<0x00AB>", "guillemotright": "<0x00BB>", "ellipsis": "<0x2026>", "uni00A0": "<pSG:178><0xFFFD><pSG:>", "Agrave": "<0x00C0>", "Atilde": "<0x00C3>", "Otilde": "<0x00D5>", "OE": "<0x0152>", "oe": "<0x0153>", "endash": "<0x2013>", "emdash": "<0x2014>", "quotedblleft": "<0x201C>", "quotedblright": "<0x201D>", "quoteleft": "<0x2018>", "quoteright": "<0x2019>", "divide": "<0x00F7>", "ydieresis": "<0x00FF>", "Ydieresis": "<0x0178>", "Euro": "<0x20AC>", "guilsinglleft": "<0x2039>", "guilsinglright": "<0x203A>", "fi": "<0xFB01>", "fl": "<0xFB02>", "daggerdbl": "<0x2021>", "periodcentered": "<0x00B7>", "quotesinglbase": "<0x201A>", "quotedblbase": "<0x201E>", "perthousand": "<0x2030>", "Acircumflex": "<0x00C2>", "Ecircumflex": "<0x00CA>", "Aacute": "<0x00C1>", "Edieresis": "<0x00CB>", "Egrave": "<0x00C8>", "Iacute": "<0x00CD>", "Icircumflex": "<0x00CE>", "Idieresis": "<0x00CF>", "Igrave": "<0x00CC>", "Oacute": "<0x00D3>", "Ocircumflex": "<0x00D4>", "apple": "<pSG:215><0xFFFD><pSG:>", "Ograve": "<0x00D2>", "Uacute": "<0x00DA>", "Ucircumflex": "<0x00DB>", "Ugrave": "<0x00D9>", "dotlessi": "<0x0131>", "circumflex": "<0x02C6>", "tilde": "<0x02DC>", "macron": "<0x00AF>", "breve": "<0x02D8>", "dotaccent": "<0x02D9>", "ring": "<0x02DA>", "cedilla": "<0x00B8>", "hungarumlaut": "<0x02DD>", "ogonek": "<0x02DB>", "caron": "<0x02C7>", "currency": "<0x00A4>", "onehalf": "<0x00BD>", "onequarter": "<0x00BC>", "onesuperior": "<0x00B9>", "threequarters": "<0x00BE>", "threesuperior": "<0x00B3>", "twosuperior": "<0x00B2>", "mu": "<0x00B5>", "nbspace": "<pSG:178><0xFFFD><pSG:>", "fraction": "<0x2044>", "logicalnot": "<0x00AC>"}
|
||||
|
||||
myFont = CurrentFont()
|
||||
myKerning = myFont.kerning
|
||||
myFontfam = myFont.info.familyName
|
||||
myFontstyle = myFont.info.styleName
|
||||
|
||||
myPath = GetFolder()
|
||||
|
||||
if myPath:
|
||||
myPath += ":" + myFontfam + "-" + myFontstyle + "_kern.txt"
|
||||
|
||||
myFile = open(myPath, "w")
|
||||
myFile.write("<ASCII-MAC>" + chr(10))
|
||||
myFile.write("<vsn:2.000000><fset:InDesign-Roman><ctable:=<Black:COLOR:CMYK:Process:0.000000,0.000000,0.000000,1.000000>>" + chr(10))
|
||||
|
||||
myBar = ProgressBar('Exporting kerning...', len(myKerning))
|
||||
for myPair in myKerning:
|
||||
myComb = str(myPair).split()
|
||||
myLeft=myComb[0][2:-2]
|
||||
myRight=myComb[1][1:-2]
|
||||
if myDict.has_key(myLeft) and myDict.has_key(myRight):
|
||||
|
||||
myLine = "<pstyle:><pga:BaseLine><ct:" + myFontstyle + "><cs:11.000000><cl:14.100000><cf:" + myFontfam + ">" + myDict[myLeft] + myDict[myRight] + "<ct:><cs:><cl:><cf:><ct:Regular><cs:5.000000><cl:14.100000><cf:Andale Mono> " + str(myKerning[myPair]) + chr(10) + "<ct:><cs:><cl:><cf:><pga:>"
|
||||
myFile.write(myLine)
|
||||
myBar.tick()
|
||||
myFile.close()
|
||||
myBar.close()
|
||||
print "Generated kerning file for", myFontfam, myFontstyle
|
||||
print "Done"
|
||||
|
||||
|
@ -0,0 +1,16 @@
|
||||
#FLM: Fun with colours
|
||||
|
||||
from robofab.world import CurrentFont
|
||||
|
||||
myFont = CurrentFont()
|
||||
myColour = 1
|
||||
|
||||
while 1:
|
||||
for myChar in myFont:
|
||||
myChar.mark = myColour
|
||||
myColour = myColour + 1
|
||||
if myColour == 256:
|
||||
myColour = 1
|
||||
myFont.update()
|
||||
|
||||
# mark: red=1, blue=170, green=80, magenta=210, cyan=130
|
@ -0,0 +1,26 @@
|
||||
#FLM: Interpolate in current font
|
||||
|
||||
# Interpolate selected glyphs in the current font
|
||||
# Paul van der Laan, 2004/08/12
|
||||
|
||||
from robofab.world import SelectFont, CurrentFont
|
||||
from robofab.interface.all.dialogs import ProgressBar
|
||||
|
||||
factor = 1.37
|
||||
myFont = CurrentFont()
|
||||
myGlyphs = myFont.selection
|
||||
|
||||
myMin = SelectFont('Select source font one:')
|
||||
if myMin:
|
||||
myMax = SelectFont('Select source font two:')
|
||||
if myMax:
|
||||
bar = ProgressBar('Interpolating...', len(myGlyphs))
|
||||
for myChar in myGlyphs:
|
||||
myFont.removeGlyph(myChar)
|
||||
myNewglyph = myFont.newGlyph(myChar)
|
||||
myNewglyph.interpolate(factor, myMin[myChar], myMax[myChar])
|
||||
myFont[myChar].mark = 26
|
||||
bar.tick()
|
||||
|
||||
bar.close()
|
||||
myFont.update()
|
@ -0,0 +1,50 @@
|
||||
#FLM: Interpolate in a new font
|
||||
|
||||
# Paul van der Laan, 2004/08/11
|
||||
|
||||
from robofab.world import SelectFont, CurrentFont, NewFont
|
||||
from robofab.interface.all.dialogs import ProgressBar
|
||||
import os.path
|
||||
|
||||
factor = .50
|
||||
|
||||
myMin = SelectFont('Select source font one:')
|
||||
if myMin:
|
||||
myMax = SelectFont('Select source font two:')
|
||||
if myMax:
|
||||
# fl.CallCommand(fl_cmd.FileNew)
|
||||
myDest = NewFont()
|
||||
bar = ProgressBar('Interpolating...', len(myMin))
|
||||
for n in range (0,len(myMin)):
|
||||
myCharname = myMin[n].name
|
||||
myNewglyph = myDest.newGlyph(myCharname)
|
||||
myNewglyph.interpolate(factor, myMin[myCharname], myMax[myCharname])
|
||||
myDest[myCharname].mark = myMin[myCharname].mark
|
||||
myDest[myCharname].unicode = myMin[myCharname].unicode
|
||||
bar.tick()
|
||||
|
||||
bar.close()
|
||||
myDest.update()
|
||||
|
||||
myMinkern = myMin.kerning
|
||||
myMaxkern = myMax.kerning
|
||||
myDestkern = myDest.kerning
|
||||
myDestkern.interpolate(myMinkern,myMaxkern,factor,clearExisting=True)
|
||||
|
||||
myNotice = `int(factor * 100)` + "% interpolatie van " + myMin.info.fontName + " en " + myMax.info.fontName
|
||||
myDest.info.notice=myNotice
|
||||
|
||||
myDest.info.familyName = myMin.info.familyName
|
||||
myDest.info.styleName = "Interpol"
|
||||
myDest.info.fontName = myMin.info.familyName + "-Interpol"
|
||||
myDest.info.fullName = myMin.info.familyName + " Interpol"
|
||||
myDest.info.menuName = myMin.info.familyName
|
||||
myDest.info.fondName = myMin.info.familyName + "-Interpol"
|
||||
|
||||
# myFont = fl.font
|
||||
# myEncoding= os.path.join(fl.path, r"Encoding", r"MACROMAN.ENC")
|
||||
# myFont.encoding.Load(myEncoding)
|
||||
|
||||
myDest.update()
|
||||
|
||||
print `int(factor * 100)` + "% interpolation of " + myMin.info.fontName + " and " + myMax.info.fontName
|
@ -0,0 +1,137 @@
|
||||
#FLM: Print all font info FL Python
|
||||
|
||||
|
||||
f = fl.font
|
||||
|
||||
if f.file_name:
|
||||
print "File: " + str(f.file_name)
|
||||
print "Number of glyphs: " + str(len(f))
|
||||
|
||||
print ""
|
||||
if f.family_name:
|
||||
print "Family Name: " + str(f.family_name)
|
||||
if f.weight:
|
||||
print "Weight: " + str(f.weight)
|
||||
if f.weight_code:
|
||||
print "Weight Code: " + str(f.weight_code)
|
||||
if f.width:
|
||||
print "Width: " + str(f.width)
|
||||
if f.font_style:
|
||||
print "Style: " + str(f.font_style)
|
||||
# 1=italic, 32=bold, 64=regular
|
||||
if f.style_name:
|
||||
print "Style Name: " + str(f.style_name)
|
||||
if f.font_name:
|
||||
print "Font Name: " + str(f.font_name)
|
||||
if f.full_name:
|
||||
print "Full Name: " + str(f.full_name)
|
||||
if f.menu_name:
|
||||
print "Menu Name: " + str(f.menu_name)
|
||||
if f.apple_name:
|
||||
print "FOND Name: " + str(f.apple_name)
|
||||
|
||||
print ""
|
||||
if f.pref_family_name:
|
||||
print "OT Family Name: " + str(f.pref_family_name)
|
||||
if f.pref_style_name:
|
||||
print "OT Style Name: " + str(f.pref_style_name)
|
||||
if f.mac_compatible:
|
||||
print "OT Mac Name: " + str(f.mac_compatible)
|
||||
|
||||
print ""
|
||||
if f.year:
|
||||
print "Year: " + str(f.year)
|
||||
if f.copyright:
|
||||
print "Copyright: " + str(f.copyright)
|
||||
if f.trademark:
|
||||
print "Trademark: " + str(f.trademark)
|
||||
if f.notice:
|
||||
print "Notice: " + str(f.notice)
|
||||
|
||||
print ""
|
||||
if f.designer:
|
||||
print "Designer: " + str(f.designer)
|
||||
if f.designer_url:
|
||||
print "Designer URL: " + str(f.designer_url)
|
||||
if f.vendor_url:
|
||||
print "Vendor URL: " + str(f.vendor_url)
|
||||
|
||||
print ""
|
||||
if f.version_major:
|
||||
print "Version: " + str(f.version_major)
|
||||
if f.version_minor:
|
||||
print "Revision: " + str(f.version_minor)
|
||||
if f.version:
|
||||
print "Version: " + str(f.version)
|
||||
if f.tt_version:
|
||||
print "TrueType Version: " + str(f.tt_version)
|
||||
|
||||
print ""
|
||||
if f.tt_u_id:
|
||||
print "TrueType Unique ID: " + str(f.tt_u_id)
|
||||
if f.unique_id:
|
||||
print "Type 1 Unique ID: " + str(f.unique_id)
|
||||
if f.vendor:
|
||||
print "TrueType Vendor Code: " + str(f.vendor)
|
||||
|
||||
print ""
|
||||
if f.panose:
|
||||
print "PANOSE: " + str(f.panose)
|
||||
|
||||
print ""
|
||||
if f.pcl_id:
|
||||
print "PCL ID: " + str(f.pcl_id)
|
||||
if f.vp_id:
|
||||
print "VP ID: " + str(f.vp_id)
|
||||
if f.ms_id:
|
||||
print "MS ID: " + str(f.ms_id)
|
||||
|
||||
print ""
|
||||
if f.upm:
|
||||
print "UPM: " + str(f.upm)
|
||||
|
||||
print ""
|
||||
if f.ascender:
|
||||
print "Ascender: " + str(f.ascender[0])
|
||||
if f.descender:
|
||||
print "Descender: " + str(f.descender[0])
|
||||
if f.cap_height:
|
||||
print "Cap Height: " + str(f.cap_height[0])
|
||||
if f.x_height:
|
||||
print "X Height: " + str(f.x_height[0])
|
||||
if f.italic_angle:
|
||||
print "Italic Angle: " + str(f.italic_angle)
|
||||
if f.slant_angle:
|
||||
print "Slant Angle: " + str(f.slant_angle)
|
||||
if f.underline_position:
|
||||
print "Underline: " + str(f.underline_position)
|
||||
if f.underline_thickness:
|
||||
print "Thickness: " + str(f.underline_thickness)
|
||||
print "Monospaced: " + str(f.is_fixed_pitch)
|
||||
|
||||
print ""
|
||||
print "Microsoft Character Set: " + str(f.ms_charset)
|
||||
if f.default_character:
|
||||
print "PFM Default Character: " + str(f.default_character)
|
||||
if f.fond_id:
|
||||
print "Mac FOND ID: " + str(f.fond_id)
|
||||
|
||||
|
||||
# if f.fontnames:
|
||||
# print "f.fontnames " + str(f.fontnames)
|
||||
# if f.note:
|
||||
# print "f.note " + str(f.note)
|
||||
# if f.pcl_chars_set:
|
||||
# print "f.pcl_chars_set " + str(f.pcl_chars_set)
|
||||
# if f.default_width:
|
||||
# print "f.default_width " + str(f.default_width[0])
|
||||
|
||||
# if f.x_u_id_num:
|
||||
# print "f.x_u_id_num " + str(f.x_u_id_num)
|
||||
# if f.x_u_id:
|
||||
# print "f.x_u_id " + str(f.x_u_id)
|
||||
|
||||
|
||||
print "--- Done"
|
||||
print ""
|
||||
print ""
|
@ -0,0 +1,100 @@
|
||||
#FLM: Print all font info Robofab
|
||||
|
||||
from robofab.world import CurrentFont
|
||||
|
||||
# f = SelectFont()
|
||||
f = CurrentFont()
|
||||
|
||||
print "Number of glyphs:", str(len(f))
|
||||
print "Number of kerning pairs:", str(len(f.kerning.keys()))
|
||||
|
||||
|
||||
if f.info.familyName:
|
||||
print "f.info.familyName " + `f.info.familyName`
|
||||
if f.info.fontStyle:
|
||||
print "f.info.fontStyle " + `f.info.fontStyle`
|
||||
if f.info.styleName:
|
||||
print "f.info.styleName " + `f.info.styleName`
|
||||
if f.info.fontName:
|
||||
print "f.info.fontName " + `f.info.fontName`
|
||||
if f.info.fullName:
|
||||
print "f.info.fullName " + `f.info.fullName`
|
||||
if f.info.menuName:
|
||||
print "f.info.menuName " + `f.info.menuName`
|
||||
if f.info.fondName:
|
||||
print "f.info.fondName " + `f.info.fondName`
|
||||
print ""
|
||||
if f.info.otFamilyName:
|
||||
print "f.info.otFamilyName " + `f.info.otFamilyName`
|
||||
if f.info.otStyleName:
|
||||
print "f.info.otStyleName " + `f.info.otStyleName`
|
||||
if f.info.otMacName:
|
||||
print "f.info.otMacName " + `f.info.otMacName`
|
||||
print ""
|
||||
if f.info.year:
|
||||
print "f.info.year " + `f.info.year`
|
||||
if f.info.copyright:
|
||||
print "f.info.copyright " + `f.info.copyright.encode('latin-1')`
|
||||
if f.info.trademark:
|
||||
print "f.info.trademark " + `f.info.trademark.encode('latin-1')`
|
||||
if f.info.notice:
|
||||
print "f.info.notice " + `f.info.notice.encode('latin-1')`
|
||||
print ""
|
||||
if f.info.designer:
|
||||
print "f.info.designer " + `f.info.designer.encode('latin-1')`
|
||||
if f.info.designerURL:
|
||||
print "f.info.designerURL " + `f.info.designerURL`
|
||||
if f.info.vendorURL:
|
||||
print "f.info.vendorURL " + `f.info.vendorURL`
|
||||
print ""
|
||||
if f.info.license:
|
||||
print "f.info.license " + `f.info.license.encode('latin-1')`
|
||||
if f.info.licenseURL:
|
||||
print "f.info.licenseURL " + `f.info.licenseURL`
|
||||
print ""
|
||||
if f.info.versionMajor:
|
||||
print "f.info.versionMajor " + `f.info.versionMajor`
|
||||
if f.info.versionMinor:
|
||||
print "f.info.versionMinor " + `f.info.versionMinor`
|
||||
if f.info.ttVersion:
|
||||
print "f.info.ttVersion " + `f.info.ttVersion`
|
||||
print ""
|
||||
if f.info.ttUniqueID:
|
||||
print "f.info.ttUniqueID " + `f.info.ttUniqueID`
|
||||
if f.info.uniqueID:
|
||||
print "f.info.uniqueID " + `f.info.uniqueID`
|
||||
if f.info.ttVendor:
|
||||
print "f.info.ttVendor " + `f.info.ttVendor`
|
||||
print ""
|
||||
if f.info.unitsPerEm:
|
||||
print "f.info.unitsPerEm " + `f.info.unitsPerEm`
|
||||
print ""
|
||||
if f.info.ascender:
|
||||
print "f.info.ascender " + `f.info.ascender`
|
||||
if f.info.capHeight:
|
||||
print "f.info.capHeight " + `f.info.capHeight`
|
||||
if f.info.italicAngle:
|
||||
print "f.info.italicAngle " + `f.info.italicAngle`
|
||||
if f.info.slantAngle:
|
||||
print "f.info.slantAngle " + `f.info.slantAngle`
|
||||
print ""
|
||||
if f.info.fondID:
|
||||
print "f.info.fondID " + `f.info.fondID`
|
||||
print ""
|
||||
if f.info.note:
|
||||
print "f.info.note " + `f.info.note.encode('latin-1')`
|
||||
print ""
|
||||
|
||||
if f.info.msCharSet:
|
||||
print "f.info.msCharSet " + `f.info.msCharSet`
|
||||
if f.info.selected:
|
||||
print "f.info.selected " + `f.info.selected`
|
||||
if f.info.defaultWidth:
|
||||
print "f.info.defaultWidth " + `f.info.defaultWidth`
|
||||
# print "f.info.parent " + `f.info.parent`
|
||||
# print "f.info.weightName " + `f.info.weightName`
|
||||
# print "f.info.weightValue " + `f.info.weightValue`
|
||||
# print "f.info.widthName " + `f.info.widthName`
|
||||
print "--- Done"
|
||||
print ""
|
||||
print ""
|
@ -0,0 +1,13 @@
|
||||
#FLM: Print kerning
|
||||
|
||||
from robofab.world import CurrentFont
|
||||
|
||||
myFont = CurrentFont()
|
||||
myKerning = myFont.kerning
|
||||
|
||||
print ""
|
||||
|
||||
for myPair in myKerning:
|
||||
myComb = str(myPair).split()
|
||||
myComb = "hh/%s/%s" %(myComb[0][2:-2], myComb[1][1:-2])
|
||||
print myComb,
|
106
Documentation/TypoTechnica 2005/scripts Folder/Paulus - font/unthread kerning.py
Executable file
106
Documentation/TypoTechnica 2005/scripts Folder/Paulus - font/unthread kerning.py
Executable file
@ -0,0 +1,106 @@
|
||||
#FLM: Unthread kerning and export as AFM files
|
||||
|
||||
from robofab.world import CurrentFont
|
||||
from robofab.interface.all.dialogs import GetFolder, ProgressBar
|
||||
|
||||
theUppercase = ("Eth", "Lslash", "Scaron", "Yacute", "Thorn", "Zcaron", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "Adieresis", "Aring", "Ccedilla", "Eacute", "Ntilde", "Odieresis", "Udieresis", "AE", "Oslash", "Agrave", "Atilde", "Otilde", "OE", "Ydieresis", "Acircumflex", "Ecircumflex", "Aacute", "Edieresis", "Egrave", "Iacute", "Icircumflex", "Idieresis", "Igrave", "Oacute", "Ocircumflex", "Ograve", "Uacute", "Ucircumflex", "Ugrave")
|
||||
|
||||
theLowercase = ("eth", "lslash", "scaron", "yacute", "thorn", "zcaron", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "aacute", "agrave", "acircumflex", "adieresis", "atilde", "aring", "ccedilla", "eacute", "egrave", "ecircumflex", "edieresis", "iacute", "igrave", "icircumflex", "idieresis", "ntilde", "oacute", "ograve", "ocircumflex", "odieresis", "otilde", "uacute", "ugrave", "ucircumflex", "udieresis", "germandbls", "mu", "ae", "oslash", "oe", "ydieresis", "fi", "fl", "dotlessi")
|
||||
|
||||
theFigures = ("zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine")
|
||||
|
||||
thePunctuation = ("exclam", "numbersign", "dollar", "percent", "ampersand", "less", "greater", "question", "questiondown", "exclamdown", "perthousand", "onehalf", "onequarter", "onesuperior", "threequarters", "threesuperior", "twosuperior", "brokenbar", "minus", "multiply", "space", "quotedbl", "quotesingle", "parenleft", "parenright", "asterisk", "plus", "comma", "hyphen", "period", "slash", "colon", "semicolon", "equal", "at", "bracketleft", "backslash", "bracketright", "asciicircum", "underscore", "grave", "braceleft", "bar", "braceright", "asciitilde", "dagger", "degree", "cent", "sterling", "section", "bullet", "paragraph", "registered", "copyright", "trademark", "acute", "dieresis", "plusminus", "yen", "ordfeminine", "ordmasculine", "logicalnot", "florin", "guillemotleft", "guillemotright", "ellipsis", "uni00A0", "endash", "emdash", "quotedblleft", "quotedblright", "quoteleft", "quoteright", "divide", "fraction", "Euro", "guilsinglleft", "guilsinglright", "daggerdbl", "periodcentered", "quotesinglbase", "quotedblbase", "circumflex", "tilde", "macron", "breve", "dotaccent", "ring", "cedilla", "hungarumlaut", "ogonek", "caron", "currency")
|
||||
|
||||
# myCollection = {"uc": theUppercase, "lc": theLowercase, "fig": theFigures, "inp": thePunctuation}
|
||||
# myCollection = {"rest": theUppercase + theLowercase + thePunctuation, "fig": theFigures,}
|
||||
myCollection = {"uc": theUppercase, "lc": theLowercase, "rest": thePunctuation + theFigures,}
|
||||
|
||||
myDict = {}
|
||||
|
||||
myFolder = GetFolder()
|
||||
myFont = CurrentFont()
|
||||
myflFont = fl.font
|
||||
myKerning = myFont.kerning
|
||||
|
||||
if myFolder:
|
||||
myBar = ProgressBar('Unthreading kerning...', len(myKerning))
|
||||
for myPair in myKerning:
|
||||
myComb = str(myPair).split()
|
||||
myLeft = myComb[0][2:-2]
|
||||
myRight = myComb[1][1:-2]
|
||||
myLeftid = ""
|
||||
myRightid = ""
|
||||
|
||||
for myGroup in myCollection:
|
||||
if myLeft in myCollection[myGroup]:
|
||||
myLeftid = str(myGroup)
|
||||
if myRight in myCollection[myGroup]:
|
||||
myRightid = str(myGroup)
|
||||
|
||||
if myRightid == "" or myLeftid == "":
|
||||
myLeftid = "! UNKNOWN GLYPH"
|
||||
|
||||
myClass = myLeftid + "-" + myRightid
|
||||
myLine = "KPX " + myLeft + " " + myRight + " " + str(myKerning[myPair])
|
||||
|
||||
if myDict.has_key(myClass):
|
||||
myDict[myClass].append(myLine)
|
||||
else:
|
||||
myDict[myClass] = [myLine]
|
||||
|
||||
myBar.tick()
|
||||
|
||||
myBar.close()
|
||||
|
||||
myBar = ProgressBar('Writing...', len(myDict))
|
||||
|
||||
for myClass in myDict:
|
||||
myPath = myFolder + ":" + myClass + "_kerning.afm"
|
||||
myFile = open(myPath, "w")
|
||||
|
||||
myFile.write("StartFontMetrics 2.0" + chr(10))
|
||||
myFile.write("Comment Copyright Paul van der Laan - Unthread kerning script" + chr(10))
|
||||
myFile.write("Comment UniqueID " + str(myflFont.unique_id) + chr(10))
|
||||
myFile.write("Comment Panose 2 11 9 3 4 0 0 2 0 4" + chr(10))
|
||||
myFile.write("FullName " + myflFont.full_name + chr(10))
|
||||
myFile.write("FontName " + myflFont.font_name + chr(10))
|
||||
myFile.write("FamilyName " + myflFont.family_name + chr(10))
|
||||
myFile.write("Weight " + myflFont.weight + chr(10))
|
||||
myFile.write("Notice " + chr(10))
|
||||
myFile.write("Version " + str(myflFont.version) + chr(10))
|
||||
myFile.write("IsFixedPitch false" + chr(10))
|
||||
myFile.write("ItalicAngle " + str(myflFont.italic_angle) + chr(10))
|
||||
myFile.write("FontBBox -79 -261 1172 865" + chr(10))
|
||||
myFile.write("Ascender " + str(myflFont.ascender[0]) + chr(10))
|
||||
myFile.write("Descender " + str(myflFont.descender[0]) + chr(10))
|
||||
myFile.write("XHeight " + str(myflFont.x_height[0]) + chr(10))
|
||||
myFile.write("CapHeight " + str(myflFont.cap_height[0]) + chr(10))
|
||||
myFile.write("UnderlinePosition " + str(myflFont.underline_position) + chr(10))
|
||||
myFile.write("UnderlineThickness " + str(myflFont.underline_thickness) + chr(10))
|
||||
myFile.write("EncodingScheme FontSpecific" + chr(10))
|
||||
myFile.write("StartCharMetrics " + str(len(myFont)) + chr(10))
|
||||
|
||||
myChar = 1
|
||||
for myGlyph in myFont:
|
||||
myLine = "C " + str(myChar) + " ; WX "+ str(myGlyph.width) + " ; N " + str(myGlyph.name) + " ; B " + str(myGlyph.box)[1:-1] + chr(10)
|
||||
myFile.write(myLine)
|
||||
myChar += 1
|
||||
|
||||
myFile.write("EndCharMetrics" + chr(10))
|
||||
myFile.write("StartKernData" + chr(10))
|
||||
myFile.write("StartKernPairs " + str(len(myDict[myClass])) + chr(10))
|
||||
|
||||
for myPair in myDict[myClass]:
|
||||
myFile.write(myPair + chr(10))
|
||||
|
||||
myFile.write("EndKernPairs" + chr(10))
|
||||
myFile.write("EndKernData" + chr(10))
|
||||
myFile.write("EndFontMetrics" + chr(10))
|
||||
|
||||
myFile.close()
|
||||
print "Generated", myPath
|
||||
myBar.tick()
|
||||
|
||||
myBar.close()
|
||||
|
||||
print "Done"
|
@ -0,0 +1,13 @@
|
||||
#FLM: Auto starting points
|
||||
|
||||
from robofab.world import CurrentGlyph
|
||||
|
||||
myGlyph = CurrentGlyph()
|
||||
|
||||
myGlyph.correctDirection()
|
||||
myGlyph.autoContourOrder()
|
||||
for contour in myGlyph:
|
||||
contour.autoStartSegment()
|
||||
myGlyph.update()
|
||||
|
||||
print "done"
|
@ -0,0 +1,15 @@
|
||||
#FLM: Build anchor for components
|
||||
|
||||
from robofab.world import CurrentGlyph
|
||||
|
||||
myGlyph=CurrentGlyph()
|
||||
|
||||
#if len(myGlyph.anchors) == 0:
|
||||
# myGlyph.appendAnchor("nieuw", (50, 50))
|
||||
|
||||
myGlyph.appendAnchor("nieuw", (50, 50))
|
||||
|
||||
myGlyph.anchors[-1].name = "bottom"
|
||||
myGlyph.anchors[-1].x = (myGlyph.box[2]+myGlyph.box[0])/2
|
||||
myGlyph.anchors[-1].y = 0
|
||||
myGlyph.update()
|
@ -0,0 +1,10 @@
|
||||
#FLM: Correct contour directions
|
||||
|
||||
from robofab.world import CurrentGlyph
|
||||
|
||||
glyph = CurrentGlyph()
|
||||
|
||||
glyph.correctDirection()
|
||||
glyph.update()
|
||||
|
||||
print "Done"
|
12
Documentation/TypoTechnica 2005/scripts Folder/Paulus - glyph/decompose.py
Executable file
12
Documentation/TypoTechnica 2005/scripts Folder/Paulus - glyph/decompose.py
Executable file
@ -0,0 +1,12 @@
|
||||
#FLM: Decompose composites
|
||||
|
||||
from robofab.world import CurrentFont, CurrentGlyph
|
||||
|
||||
myFont = CurrentFont()
|
||||
myGlyph = CurrentGlyph()
|
||||
|
||||
if myGlyph.components:
|
||||
for c in range(0,len(myGlyph.components)):
|
||||
myGlyph.components[0].decompose()
|
||||
myGlyph.update()
|
||||
print "Done"
|
@ -0,0 +1,11 @@
|
||||
#FLM: Remove overlap
|
||||
|
||||
from robofab.world import CurrentFont, CurrentGlyph
|
||||
|
||||
myFont = CurrentFont()
|
||||
myGlyph = CurrentGlyph()
|
||||
|
||||
if myGlyph:
|
||||
myGlyph.removeOverlap()
|
||||
myGlyph.update()
|
||||
print "Done"
|
@ -0,0 +1,7 @@
|
||||
#FLM: Select accents
|
||||
|
||||
from robofab.world import CurrentFont
|
||||
|
||||
myFont = CurrentFont()
|
||||
|
||||
myFont.selection = ['grave', 'acute', 'dieresis', 'circumflex', 'tilde', 'macron', 'breve', 'dotaccent', 'ring', 'cedilla', 'hungarumlaut', 'ogonek', 'caron', 'commaaccent']
|
@ -0,0 +1,7 @@
|
||||
#FLM: Select Latin-1 accented glyphs
|
||||
|
||||
from robofab.world import CurrentFont
|
||||
|
||||
myFont = CurrentFont()
|
||||
|
||||
myFont.selection = ['Scaron', 'scaron', 'Yacute', 'yacute', 'Zcaron', 'zcaron', 'Adieresis', 'Aring', 'Ccedilla', 'Eacute', 'Ntilde', 'Odieresis', 'Udieresis', 'aacute', 'agrave', 'acircumflex', 'adieresis', 'atilde', 'aring', 'ccedilla', 'eacute', 'egrave', 'ecircumflex', 'edieresis', 'iacute', 'igrave', 'icircumflex', 'idieresis', 'ntilde', 'oacute', 'ograve', 'ocircumflex', 'odieresis', 'otilde', 'uacute', 'ugrave', 'ucircumflex', 'udieresis', 'Agrave', 'Atilde', 'Otilde', 'ydieresis', 'Ydieresis', 'Acircumflex', 'Ecircumflex', 'Aacute', 'Edieresis', 'Egrave', 'Iacute', 'Icircumflex', 'Idieresis', 'Igrave', 'Oacute', 'Ocircumflex', 'Ograve', 'Uacute', 'Ucircumflex', 'Ugrave']
|
@ -0,0 +1,7 @@
|
||||
#FLM: Select Latin-2 accented lowercase
|
||||
|
||||
from robofab.world import CurrentFont
|
||||
|
||||
myFont = CurrentFont()
|
||||
|
||||
myFont.selection = ['amacron', 'aogonek', 'ccaron', 'cacute', 'zacute', 'dcaron', 'emacron', 'edotaccent', 'ecaron', 'eogonek', 'gcommaaccent', 'iogonek', 'imacron', 'lcommaaccent', 'lcaron', 'lacute', 'ncommaaccent', 'nacute', 'ncaron', 'ohungarumlaut', 'omacron', 'racute', 'rcaron', 'rcommaaccent', 'sacute', 'tcaron', 'umacron', 'uring', 'uhungarumlaut', 'uogonek', 'kcommaaccent', 'zdotaccent', 'abreve', 'scedilla', 'tcommaaccent', 'gbreve', 'scommaaccent', 'uni021B']
|
@ -0,0 +1,7 @@
|
||||
#FLM: Select Latin-2 accented glyphs
|
||||
|
||||
from robofab.world import CurrentFont
|
||||
|
||||
myFont = CurrentFont()
|
||||
|
||||
myFont.selection = ['Amacron', 'amacron', 'Aogonek', 'aogonek', 'Ccaron', 'ccaron', 'Cacute', 'cacute', 'Zacute', 'zacute', 'Dcaron', 'dcaron', 'Emacron', 'emacron', 'Edotaccent', 'edotaccent', 'Ecaron', 'ecaron', 'Eogonek', 'eogonek', 'gcommaaccent', 'Iogonek', 'iogonek', 'Imacron', 'imacron', 'Kcommaaccent', 'Lcommaaccent', 'lcommaaccent', 'Lcaron', 'lcaron', 'Lacute', 'lacute', 'Ncommaaccent', 'ncommaaccent', 'Nacute', 'nacute', 'Ncaron', 'ncaron', 'Ohungarumlaut', 'ohungarumlaut', 'Omacron', 'omacron', 'Racute', 'racute', 'Rcaron', 'rcaron', 'Rcommaaccent', 'rcommaaccent', 'Sacute', 'sacute', 'Tcaron', 'tcaron', 'Umacron', 'umacron', 'Uring', 'uring', 'Uhungarumlaut', 'uhungarumlaut', 'Uogonek', 'uogonek', 'kcommaaccent', 'Zdotaccent', 'zdotaccent', 'Gcommaaccent', 'Abreve', 'Scedilla', 'abreve', 'scedilla', 'Tcommaaccent', 'tcommaaccent', 'Gbreve', 'gbreve', 'Idotaccent', 'Scommaaccent', 'scommaaccent', 'uni021A', 'uni021B']
|
BIN
Documentation/TypoTechnica 2005/scripts.sit
Normal file
BIN
Documentation/TypoTechnica 2005/scripts.sit
Normal file
Binary file not shown.
126
Documentation/fontToolsDocs/fontTools.afmLib.html
Normal file
126
Documentation/fontToolsDocs/fontTools.afmLib.html
Normal file
@ -0,0 +1,126 @@
|
||||
|
||||
<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html><head><title>Python: module fontTools.afmLib</title>
|
||||
</head><body bgcolor="#f0f0f8">
|
||||
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
|
||||
<tr bgcolor="#7799ee">
|
||||
<td valign=bottom> <br>
|
||||
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong><a href="fontTools.html"><font color="#ffffff">fontTools</font></a>.afmLib</strong></big></big> (version $Id: afmLib.py,v 1.6 2003/05/24 12:50:47 jvr Exp $)</font></td
|
||||
><td align=right valign=bottom
|
||||
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/code/fontTools/Lib/fontTools/afmLib.py">/code/fontTools/Lib/fontTools/afmLib.py</a></font></td></tr></table>
|
||||
<p><tt>Module for reading and writing <a href="#AFM">AFM</a> files.</tt></p>
|
||||
<p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#aa55cc">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td>
|
||||
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="re.html">re</a><br>
|
||||
</td><td width="25%" valign=top><a href="string.html">string</a><br>
|
||||
</td><td width="25%" valign=top><a href="types.html">types</a><br>
|
||||
</td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#ee77aa">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td>
|
||||
<td width="100%"><dl>
|
||||
<dt><font face="helvetica, arial"><a href="fontTools.afmLib.html#AFM">AFM</a>
|
||||
</font></dt><dt><font face="helvetica, arial"><a href="exceptions.html#Exception">exceptions.Exception</a>
|
||||
</font></dt><dd>
|
||||
<dl>
|
||||
<dt><font face="helvetica, arial"><a href="fontTools.afmLib.html#error">error</a>
|
||||
</font></dt></dl>
|
||||
</dd>
|
||||
</dl>
|
||||
<p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#ffc8d8">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#000000" face="helvetica, arial"><a name="AFM">class <strong>AFM</strong></a></font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
|
||||
<td width="100%">Methods defined here:<br>
|
||||
<dl><dt><a name="AFM-__delattr__"><strong>__delattr__</strong></a>(self, attr)</dt></dl>
|
||||
|
||||
<dl><dt><a name="AFM-__delitem__"><strong>__delitem__</strong></a>(self, key)</dt></dl>
|
||||
|
||||
<dl><dt><a name="AFM-__getattr__"><strong>__getattr__</strong></a>(self, attr)</dt></dl>
|
||||
|
||||
<dl><dt><a name="AFM-__getitem__"><strong>__getitem__</strong></a>(self, key)</dt></dl>
|
||||
|
||||
<dl><dt><a name="AFM-__init__"><strong>__init__</strong></a>(self, path<font color="#909090">=None</font>)</dt></dl>
|
||||
|
||||
<dl><dt><a name="AFM-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="AFM-__setattr__"><strong>__setattr__</strong></a>(self, attr, value)</dt></dl>
|
||||
|
||||
<dl><dt><a name="AFM-__setitem__"><strong>__setitem__</strong></a>(self, key, value)</dt></dl>
|
||||
|
||||
<dl><dt><a name="AFM-addComment"><strong>addComment</strong></a>(self, comment)</dt></dl>
|
||||
|
||||
<dl><dt><a name="AFM-addComposite"><strong>addComposite</strong></a>(self, glyphName, components)</dt></dl>
|
||||
|
||||
<dl><dt><a name="AFM-chars"><strong>chars</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="AFM-comments"><strong>comments</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="AFM-has_char"><strong>has_char</strong></a>(self, char)</dt></dl>
|
||||
|
||||
<dl><dt><a name="AFM-has_kernpair"><strong>has_kernpair</strong></a>(self, pair)</dt></dl>
|
||||
|
||||
<dl><dt><a name="AFM-kernpairs"><strong>kernpairs</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="AFM-parseattr"><strong>parseattr</strong></a>(self, word, rest)</dt></dl>
|
||||
|
||||
<dl><dt><a name="AFM-parsechar"><strong>parsechar</strong></a>(self, rest)</dt></dl>
|
||||
|
||||
<dl><dt><a name="AFM-parsecomposite"><strong>parsecomposite</strong></a>(self, rest)</dt></dl>
|
||||
|
||||
<dl><dt><a name="AFM-parsekernpair"><strong>parsekernpair</strong></a>(self, rest)</dt></dl>
|
||||
|
||||
<dl><dt><a name="AFM-read"><strong>read</strong></a>(self, path)</dt></dl>
|
||||
|
||||
<dl><dt><a name="AFM-write"><strong>write</strong></a>(self, path, sep<font color="#909090">='<font color="#c040c0">\r</font>'</font>)</dt></dl>
|
||||
|
||||
</td></tr></table> <p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#ffc8d8">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#000000" face="helvetica, arial"><a name="error">class <strong>error</strong></a>(<a href="exceptions.html#Exception">exceptions.Exception</a>)</font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
|
||||
<td width="100%">Methods inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
|
||||
<dl><dt><a name="error-__getitem__"><strong>__getitem__</strong></a>(...)</dt></dl>
|
||||
|
||||
<dl><dt><a name="error-__init__"><strong>__init__</strong></a>(...)</dt></dl>
|
||||
|
||||
<dl><dt><a name="error-__str__"><strong>__str__</strong></a>(...)</dt></dl>
|
||||
|
||||
</td></tr></table></td></tr></table><p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#eeaa77">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td>
|
||||
<td width="100%"><dl><dt><a name="-readlines"><strong>readlines</strong></a>(path)</dt></dl>
|
||||
<dl><dt><a name="-writelines"><strong>writelines</strong></a>(path, lines, sep<font color="#909090">='<font color="#c040c0">\r</font>'</font>)</dt></dl>
|
||||
</td></tr></table><p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#55aa55">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td>
|
||||
<td width="100%"><strong>__version__</strong> = '$Id: afmLib.py,v 1.6 2003/05/24 12:50:47 jvr Exp $'<br>
|
||||
<strong>charRE</strong> = <_sre.SRE_Pattern object at 0x1916400><br>
|
||||
<strong>componentRE</strong> = <_sre.SRE_Pattern object at 0x116e470><br>
|
||||
<strong>compositeRE</strong> = <_sre.SRE_Pattern object at 0x131cb80><br>
|
||||
<strong>identifierRE</strong> = <_sre.SRE_Pattern object at 0x14f3708><br>
|
||||
<strong>kernRE</strong> = <_sre.SRE_Pattern object at 0x1175860><br>
|
||||
<strong>preferredAttributeOrder</strong> = ['FontName', 'FullName', 'FamilyName', 'Weight', 'ItalicAngle', 'IsFixedPitch', 'FontBBox', 'UnderlinePosition', 'UnderlineThickness', 'Version', 'Notice', 'EncodingScheme', 'CapHeight', 'XHeight', 'Ascender', 'Descender']</td></tr></table>
|
||||
</body></html>
|
24
Documentation/fontToolsDocs/fontTools.agl.html
Normal file
24
Documentation/fontToolsDocs/fontTools.agl.html
Normal file
@ -0,0 +1,24 @@
|
||||
|
||||
<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html><head><title>Python: module fontTools.agl</title>
|
||||
</head><body bgcolor="#f0f0f8">
|
||||
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
|
||||
<tr bgcolor="#7799ee">
|
||||
<td valign=bottom> <br>
|
||||
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong><a href="fontTools.html"><font color="#ffffff">fontTools</font></a>.agl</strong></big></big></font></td
|
||||
><td align=right valign=bottom
|
||||
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/code/fontTools/Lib/fontTools/agl.py">/code/fontTools/Lib/fontTools/agl.py</a></font></td></tr></table>
|
||||
<p><tt># The table below is taken from<br>
|
||||
# <a href="http://partners.adobe.com/asn/tech/type/aglfn13.txt">http://partners.adobe.com/asn/tech/type/aglfn13.txt</a></tt></p>
|
||||
<p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#55aa55">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td>
|
||||
<td width="100%"><strong>AGL2UV</strong> = {'A': 65, 'AE': 198, 'AEacute': 508, 'Aacute': 193, 'Abreve': 258, 'Acircumflex': 194, 'Adieresis': 196, 'Agrave': 192, 'Alpha': 913, 'Alphatonos': 902, ...}<br>
|
||||
<strong>AGLError</strong> = 'AGLError'<br>
|
||||
<strong>UV2AGL</strong> = {32: 'space', 33: 'exclam', 34: 'quotedbl', 35: 'numbersign', 36: 'dollar', 37: 'percent', 38: 'ampersand', 39: 'quotesingle', 40: 'parenleft', 41: 'parenright', ...}</td></tr></table>
|
||||
</body></html>
|
26
Documentation/fontToolsDocs/fontTools.agl_old.html
Normal file
26
Documentation/fontToolsDocs/fontTools.agl_old.html
Normal file
@ -0,0 +1,26 @@
|
||||
|
||||
<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html><head><title>Python: module fontTools.agl_old</title>
|
||||
</head><body bgcolor="#f0f0f8">
|
||||
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
|
||||
<tr bgcolor="#7799ee">
|
||||
<td valign=bottom> <br>
|
||||
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong><a href="fontTools.html"><font color="#ffffff">fontTools</font></a>.agl_old</strong></big></big></font></td
|
||||
><td align=right valign=bottom
|
||||
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/Volumes/Kwak/Data/code/fonttools/Lib/fontTools/agl_old.py">/Volumes/Kwak/Data/code/fonttools/Lib/fontTools/agl_old.py</a></font></td></tr></table>
|
||||
<p><tt># The URLs in the text below are not correct. They should be:<br>
|
||||
# <a href="http://partners.adobe.com/asn/developer/typeforum/unicodegn.html">http://partners.adobe.com/asn/developer/typeforum/unicodegn.html</a><br>
|
||||
# <a href="http://partners.adobe.com/asn/developer/typeforum/corporateuse.txt">http://partners.adobe.com/asn/developer/typeforum/corporateuse.txt</a><br>
|
||||
#</tt></p>
|
||||
<p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#55aa55">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td>
|
||||
<td width="100%"><strong>AGL2UV</strong> = {'A': 65, 'AE': 198, 'AEacute': 508, 'AEsmall': 63462, 'Aacute': 193, 'Aacutesmall': 63457, 'Abreve': 258, 'Acircumflex': 194, 'Acircumflexsmall': 63458, 'Acute': 63177, ...}<br>
|
||||
<strong>AGLError</strong> = 'AGLError'<br>
|
||||
<strong>UV2AGL</strong> = {32: 'space', 33: 'exclam', 34: 'quotedbl', 35: 'numbersign', 36: 'dollar', 37: 'percent', 38: 'ampersand', 39: 'quotesingle', 40: 'parenleft', 41: 'parenright', ...}</td></tr></table>
|
||||
</body></html>
|
1286
Documentation/fontToolsDocs/fontTools.cffLib.html
Normal file
1286
Documentation/fontToolsDocs/fontTools.cffLib.html
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,21 @@
|
||||
|
||||
<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html><head><title>Python: module fontTools.encodings.MacRoman</title>
|
||||
</head><body bgcolor="#f0f0f8">
|
||||
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
|
||||
<tr bgcolor="#7799ee">
|
||||
<td valign=bottom> <br>
|
||||
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong><a href="fontTools.html"><font color="#ffffff">fontTools</font></a>.<a href="fontTools.encodings.html"><font color="#ffffff">encodings</font></a>.MacRoman</strong></big></big></font></td
|
||||
><td align=right valign=bottom
|
||||
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/code/fontTools/Lib/fontTools/encodings/MacRoman.py">/code/fontTools/Lib/fontTools/encodings/MacRoman.py</a></font></td></tr></table>
|
||||
<p></p>
|
||||
<p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#55aa55">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td>
|
||||
<td width="100%"><strong>MacRoman</strong> = ['NUL', 'Eth', 'eth', 'Lslash', 'lslash', 'Scaron', 'scaron', 'Yacute', 'yacute', 'HT', 'LF', 'Thorn', 'thorn', 'CR', 'Zcaron', 'zcaron', 'DLE', 'DC1', 'DC2', 'DC3', ...]</td></tr></table>
|
||||
</body></html>
|
@ -0,0 +1,21 @@
|
||||
|
||||
<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html><head><title>Python: module fontTools.encodings.StandardEncoding</title>
|
||||
</head><body bgcolor="#f0f0f8">
|
||||
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
|
||||
<tr bgcolor="#7799ee">
|
||||
<td valign=bottom> <br>
|
||||
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong><a href="fontTools.html"><font color="#ffffff">fontTools</font></a>.<a href="fontTools.encodings.html"><font color="#ffffff">encodings</font></a>.StandardEncoding</strong></big></big></font></td
|
||||
><td align=right valign=bottom
|
||||
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/code/fontTools/Lib/fontTools/encodings/StandardEncoding.py">/code/fontTools/Lib/fontTools/encodings/StandardEncoding.py</a></font></td></tr></table>
|
||||
<p></p>
|
||||
<p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#55aa55">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td>
|
||||
<td width="100%"><strong>StandardEncoding</strong> = ['.notdef', '.notdef', '.notdef', '.notdef', '.notdef', '.notdef', '.notdef', '.notdef', '.notdef', '.notdef', '.notdef', '.notdef', '.notdef', '.notdef', '.notdef', '.notdef', '.notdef', '.notdef', '.notdef', '.notdef', ...]</td></tr></table>
|
||||
</body></html>
|
24
Documentation/fontToolsDocs/fontTools.encodings.html
Normal file
24
Documentation/fontToolsDocs/fontTools.encodings.html
Normal file
@ -0,0 +1,24 @@
|
||||
|
||||
<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html><head><title>Python: package fontTools.encodings</title>
|
||||
</head><body bgcolor="#f0f0f8">
|
||||
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
|
||||
<tr bgcolor="#7799ee">
|
||||
<td valign=bottom> <br>
|
||||
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong><a href="fontTools.html"><font color="#ffffff">fontTools</font></a>.encodings</strong></big></big></font></td
|
||||
><td align=right valign=bottom
|
||||
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/code/fontTools/Lib/fontTools/encodings/__init__.py">/code/fontTools/Lib/fontTools/encodings/__init__.py</a></font></td></tr></table>
|
||||
<p><tt>Empty __init__.py file to signal Python this directory is a package.<br>
|
||||
(It can't be completely empty since WinZip seems to skip empty files.)</tt></p>
|
||||
<p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#aa55cc">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#ffffff" face="helvetica, arial"><big><strong>Package Contents</strong></big></font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td>
|
||||
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="fontTools.encodings.MacRoman.html">MacRoman</a><br>
|
||||
</td><td width="25%" valign=top><a href="fontTools.encodings.StandardEncoding.html">StandardEncoding</a><br>
|
||||
</td><td width="25%" valign=top></td><td width="25%" valign=top></td></tr></table></td></tr></table>
|
||||
</body></html>
|
114
Documentation/fontToolsDocs/fontTools.fondLib.html
Normal file
114
Documentation/fontToolsDocs/fontTools.fondLib.html
Normal file
@ -0,0 +1,114 @@
|
||||
|
||||
<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html><head><title>Python: module fontTools.fondLib</title>
|
||||
</head><body bgcolor="#f0f0f8">
|
||||
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
|
||||
<tr bgcolor="#7799ee">
|
||||
<td valign=bottom> <br>
|
||||
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong><a href="fontTools.html"><font color="#ffffff">fontTools</font></a>.fondLib</strong></big></big></font></td
|
||||
><td align=right valign=bottom
|
||||
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/code/fontTools/Lib/fontTools/fondLib.py">/code/fontTools/Lib/fontTools/fondLib.py</a></font></td></tr></table>
|
||||
<p></p>
|
||||
<p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#aa55cc">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td>
|
||||
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="Carbon.Res.html">Carbon.Res</a><br>
|
||||
<a href="os.html">os</a><br>
|
||||
</td><td width="25%" valign=top><a href="sstruct.html">sstruct</a><br>
|
||||
<a href="string.html">string</a><br>
|
||||
</td><td width="25%" valign=top><a href="struct.html">struct</a><br>
|
||||
</td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#ee77aa">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td>
|
||||
<td width="100%"><dl>
|
||||
<dt><font face="helvetica, arial"><a href="fontTools.fondLib.html#BitmapFontFile">BitmapFontFile</a>
|
||||
</font></dt><dt><font face="helvetica, arial"><a href="fontTools.fondLib.html#FondSelector">FondSelector</a>
|
||||
</font></dt><dt><font face="helvetica, arial"><a href="fontTools.fondLib.html#FontFamily">FontFamily</a>
|
||||
</font></dt></dl>
|
||||
<p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#ffc8d8">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#000000" face="helvetica, arial"><a name="BitmapFontFile">class <strong>BitmapFontFile</strong></a></font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
|
||||
<td width="100%">Methods defined here:<br>
|
||||
<dl><dt><a name="BitmapFontFile-__init__"><strong>__init__</strong></a>(self, path, mode<font color="#909090">='r'</font>)</dt></dl>
|
||||
|
||||
<dl><dt><a name="BitmapFontFile-close"><strong>close</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="BitmapFontFile-getFONDs"><strong>getFONDs</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="BitmapFontFile-minimalparse"><strong>minimalparse</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="BitmapFontFile-parse"><strong>parse</strong></a>(self)</dt></dl>
|
||||
|
||||
</td></tr></table> <p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#ffc8d8">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#000000" face="helvetica, arial"><a name="FondSelector">class <strong>FondSelector</strong></a></font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
|
||||
<td width="100%">Methods defined here:<br>
|
||||
<dl><dt><a name="FondSelector-__init__"><strong>__init__</strong></a>(self, fondlist)</dt></dl>
|
||||
|
||||
<dl><dt><a name="FondSelector-checksel"><strong>checksel</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="FondSelector-close"><strong>close</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="FondSelector-listhit"><strong>listhit</strong></a>(self, isDbl)</dt></dl>
|
||||
|
||||
</td></tr></table> <p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#ffc8d8">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#000000" face="helvetica, arial"><a name="FontFamily">class <strong>FontFamily</strong></a></font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
|
||||
<td width="100%">Methods defined here:<br>
|
||||
<dl><dt><a name="FontFamily-__init__"><strong>__init__</strong></a>(self, theRes, mode<font color="#909090">='r'</font>)</dt></dl>
|
||||
|
||||
<dl><dt><a name="FontFamily-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="FontFamily-getflags"><strong>getflags</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="FontFamily-minimalparse"><strong>minimalparse</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="FontFamily-parse"><strong>parse</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="FontFamily-save"><strong>save</strong></a>(self, destresfile<font color="#909090">=None</font>)</dt></dl>
|
||||
|
||||
<dl><dt><a name="FontFamily-setflags"><strong>setflags</strong></a>(self, flags)</dt></dl>
|
||||
|
||||
</td></tr></table></td></tr></table><p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#eeaa77">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td>
|
||||
<td width="100%"><dl><dt><a name="-makeLWFNfilename"><strong>makeLWFNfilename</strong></a>(name)</dt></dl>
|
||||
<dl><dt><a name="-splitname"><strong>splitname</strong></a>(name, famname<font color="#909090">=None</font>)</dt></dl>
|
||||
</td></tr></table><p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#55aa55">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td>
|
||||
<td width="100%"><strong>DEBUG</strong> = 0<br>
|
||||
<strong>FONDheadersize</strong> = 52<br>
|
||||
<strong>error</strong> = 'fondLib.error'<br>
|
||||
<strong>headerformat</strong> = '<font color="#c040c0">\n\t</font>><font color="#c040c0">\n\t</font>ffFlags:<font color="#c040c0">\t</font>h<font color="#c040c0">\n\t</font>ffFamID:<font color="#c040c0">\t</font>h<font color="#c040c0">\n\t</font>ffFirstChar:<font color="#c040c0">\t</font>h<font color="#c040c0">\n\t</font>ffL...Max:<font color="#c040c0">\t</font>h<font color="#c040c0">\n\t</font>ffWTabOff:<font color="#c040c0">\t</font>l<font color="#c040c0">\n\t</font>ffKernOff:<font color="#c040c0">\t</font>l<font color="#c040c0">\n\t</font>ffStylOff:<font color="#c040c0">\t</font>l<font color="#c040c0">\n</font>'<br>
|
||||
<strong>uppercase</strong> = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'</td></tr></table>
|
||||
</body></html>
|
40
Documentation/fontToolsDocs/fontTools.html
Normal file
40
Documentation/fontToolsDocs/fontTools.html
Normal file
@ -0,0 +1,40 @@
|
||||
|
||||
<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html><head><title>Python: package fontTools</title>
|
||||
</head><body bgcolor="#f0f0f8">
|
||||
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
|
||||
<tr bgcolor="#7799ee">
|
||||
<td valign=bottom> <br>
|
||||
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>fontTools</strong></big></big></font></td
|
||||
><td align=right valign=bottom
|
||||
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/code/fontTools/Lib/fontTools/__init__.py">/code/fontTools/Lib/fontTools/__init__.py</a></font></td></tr></table>
|
||||
<p></p>
|
||||
<p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#aa55cc">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#ffffff" face="helvetica, arial"><big><strong>Package Contents</strong></big></font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td>
|
||||
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="fontTools.afmLib.html">afmLib</a><br>
|
||||
<a href="fontTools.agl.html">agl</a><br>
|
||||
<a href="fontTools.cffLib.html">cffLib</a><br>
|
||||
</td><td width="25%" valign=top><a href="fontTools.encodings.html"><strong>encodings</strong> (package)</a><br>
|
||||
<a href="fontTools.fondLib.html">fondLib</a><br>
|
||||
<a href="fontTools.misc.html"><strong>misc</strong> (package)</a><br>
|
||||
</td><td width="25%" valign=top><a href="fontTools.nfntLib.html">nfntLib</a><br>
|
||||
<a href="fontTools.pens.html"><strong>pens</strong> (package)</a><br>
|
||||
<a href="fontTools.t1Lib.html">t1Lib</a><br>
|
||||
</td><td width="25%" valign=top><a href="fontTools.ttLib.html"><strong>ttLib</strong> (package)</a><br>
|
||||
<a href="fontTools.ttx.html">ttx</a><br>
|
||||
<a href="fontTools.unicode.html">unicode</a><br>
|
||||
</td></tr></table></td></tr></table><p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#55aa55">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td>
|
||||
<td width="100%"><strong>version</strong> = '2.0b2'</td></tr></table>
|
||||
</body></html>
|
45
Documentation/fontToolsDocs/fontTools.misc.arrayTools.html
Normal file
45
Documentation/fontToolsDocs/fontTools.misc.arrayTools.html
Normal file
@ -0,0 +1,45 @@
|
||||
|
||||
<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html><head><title>Python: module fontTools.misc.arrayTools</title>
|
||||
</head><body bgcolor="#f0f0f8">
|
||||
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
|
||||
<tr bgcolor="#7799ee">
|
||||
<td valign=bottom> <br>
|
||||
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong><a href="fontTools.html"><font color="#ffffff">fontTools</font></a>.<a href="fontTools.misc.html"><font color="#ffffff">misc</font></a>.arrayTools</strong></big></big></font></td
|
||||
><td align=right valign=bottom
|
||||
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/code/fontTools/Lib/fontTools/misc/arrayTools.py">/code/fontTools/Lib/fontTools/misc/arrayTools.py</a></font></td></tr></table>
|
||||
<p><tt># Various array and rectangle tools, but mostly rectangles, hence the<br>
|
||||
# name of this module (not).<br>
|
||||
#</tt></p>
|
||||
<p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#eeaa77">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td>
|
||||
<td width="100%"><dl><dt><a name="-asInt16"><strong>asInt16</strong></a>(array)</dt><dd><tt>Round and cast to 16 bit integer.</tt></dd></dl>
|
||||
<dl><dt><a name="-calcBounds"><strong>calcBounds</strong></a>(array)</dt><dd><tt>Return the bounding rectangle of a 2D points array as a tuple:<br>
|
||||
(xMin, yMin, xMax, yMax)</tt></dd></dl>
|
||||
<dl><dt><a name="-insetRect"><strong>insetRect</strong></a>((xMin, yMin, xMax, yMax), dx, dy)</dt><dd><tt>Inset the rectangle by dx, dy on all sides.</tt></dd></dl>
|
||||
<dl><dt><a name="-intRect"><strong>intRect</strong></a>((xMin, yMin, xMax, yMax))</dt><dd><tt>Return the rectangle, rounded off to integer values, but guaranteeing that<br>
|
||||
the resulting rectangle is NOT smaller than the original.</tt></dd></dl>
|
||||
<dl><dt><a name="-normRect"><strong>normRect</strong></a>((xMin, yMin, xMax, yMax))</dt><dd><tt>Normalize the rectangle so that the following holds:<br>
|
||||
xMin <= xMax and yMin <= yMax</tt></dd></dl>
|
||||
<dl><dt><a name="-offsetRect"><strong>offsetRect</strong></a>((xMin, yMin, xMax, yMax), dx, dy)</dt><dd><tt>Offset the rectangle by dx, dy.</tt></dd></dl>
|
||||
<dl><dt><a name="-pointInRect"><strong>pointInRect</strong></a>((x, y), rect)</dt><dd><tt>Return True when point (x, y) is inside rect.</tt></dd></dl>
|
||||
<dl><dt><a name="-pointsInRect"><strong>pointsInRect</strong></a>(array, rect)</dt><dd><tt>Find out which points or array are inside rect. <br>
|
||||
Returns an array with a boolean for each point.</tt></dd></dl>
|
||||
<dl><dt><a name="-rectCenter"><strong>rectCenter</strong></a>((xMin, yMin, xMax, yMax))</dt><dd><tt>Return the center of the rectangle as an (x, y) coordinate.</tt></dd></dl>
|
||||
<dl><dt><a name="-scaleRect"><strong>scaleRect</strong></a>((xMin, yMin, xMax, yMax), x, y)</dt><dd><tt>Scale the rectangle by x, y.</tt></dd></dl>
|
||||
<dl><dt><a name="-sectRect"><strong>sectRect</strong></a>((xMin1, yMin1, xMax1, yMax1), (xMin2, yMin2, xMax2, yMax2))</dt><dd><tt>Return a boolean and a rectangle. If the input rectangles intersect, return<br>
|
||||
True and the intersecting rectangle. Return False and (0, 0, 0, 0) if the input<br>
|
||||
rectangles don't intersect.</tt></dd></dl>
|
||||
<dl><dt><a name="-unionRect"><strong>unionRect</strong></a>((xMin1, yMin1, xMax1, yMax1), (xMin2, yMin2, xMax2, yMax2))</dt><dd><tt>Return the smallest rectangle in which both input rectangles are fully<br>
|
||||
enclosed. In other words, return the total bounding rectangle of both input<br>
|
||||
rectangles.</tt></dd></dl>
|
||||
<dl><dt><a name="-updateBounds"><strong>updateBounds</strong></a>(bounds, (x, y), min<font color="#909090">=<built-in function min></font>, max<font color="#909090">=<built-in function max></font>)</dt><dd><tt>Return the bounding recangle of rectangle bounds and point (x, y).</tt></dd></dl>
|
||||
<dl><dt><a name="-vectorLength"><strong>vectorLength</strong></a>(vector)</dt><dd><tt>Return the length of the given vector.</tt></dd></dl>
|
||||
</td></tr></table>
|
||||
</body></html>
|
148
Documentation/fontToolsDocs/fontTools.misc.bezierTools.html
Normal file
148
Documentation/fontToolsDocs/fontTools.misc.bezierTools.html
Normal file
@ -0,0 +1,148 @@
|
||||
|
||||
<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html><head><title>Python: module fontTools.misc.bezierTools</title>
|
||||
</head><body bgcolor="#f0f0f8">
|
||||
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
|
||||
<tr bgcolor="#7799ee">
|
||||
<td valign=bottom> <br>
|
||||
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong><a href="fontTools.html"><font color="#ffffff">fontTools</font></a>.<a href="fontTools.misc.html"><font color="#ffffff">misc</font></a>.bezierTools</strong></big></big></font></td
|
||||
><td align=right valign=bottom
|
||||
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/code/fontTools/Lib/fontTools/misc/bezierTools.py">/code/fontTools/Lib/fontTools/misc/bezierTools.py</a></font></td></tr></table>
|
||||
<p><tt>fontTools.misc.bezierTools.py -- tools for working with bezier path segments.</tt></p>
|
||||
<p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#aa55cc">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td>
|
||||
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="Numeric.html">Numeric</a><br>
|
||||
</td><td width="25%" valign=top></td><td width="25%" valign=top></td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#eeaa77">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td>
|
||||
<td width="100%"><dl><dt><a name="-acos"><strong>acos</strong></a>(...)</dt><dd><tt><a href="#-acos">acos</a>(x)<br>
|
||||
<br>
|
||||
Return the arc cosine (measured in radians) of x.</tt></dd></dl>
|
||||
<dl><dt><a name="-calcCubicBounds"><strong>calcCubicBounds</strong></a>(pt1, pt2, pt3, pt4)</dt><dd><tt>Return the bounding rectangle for a cubic bezier segment.<br>
|
||||
pt1 and pt4 are the "anchor" points, pt2 and pt3 are the "handles".<br>
|
||||
<br>
|
||||
>>> <a href="#-calcCubicBounds">calcCubicBounds</a>((0, 0), (25, 100), (75, 100), (100, 0))<br>
|
||||
(0.0, 0.0, 100.0, 75.0)<br>
|
||||
>>> <a href="#-calcCubicBounds">calcCubicBounds</a>((0, 0), (50, 0), (100, 50), (100, 100))<br>
|
||||
(0.0, 0.0, 100.0, 100.0)<br>
|
||||
>>> <a href="#-calcCubicBounds">calcCubicBounds</a>((50, 0), (0, 100), (100, 100), (50, 0))<br>
|
||||
(35.566243270259356, 0.0, 64.433756729740679, 75.0)</tt></dd></dl>
|
||||
<dl><dt><a name="-calcCubicParameters"><strong>calcCubicParameters</strong></a>(pt1, pt2, pt3, pt4)</dt></dl>
|
||||
<dl><dt><a name="-calcCubicPoints"><strong>calcCubicPoints</strong></a>(a, b, c, d)</dt></dl>
|
||||
<dl><dt><a name="-calcQuadraticBounds"><strong>calcQuadraticBounds</strong></a>(pt1, pt2, pt3)</dt><dd><tt>Return the bounding rectangle for a qudratic bezier segment.<br>
|
||||
pt1 and pt3 are the "anchor" points, pt2 is the "handle".<br>
|
||||
<br>
|
||||
>>> <a href="#-calcQuadraticBounds">calcQuadraticBounds</a>((0, 0), (50, 100), (100, 0))<br>
|
||||
(0.0, 0.0, 100.0, 50.0)<br>
|
||||
>>> <a href="#-calcQuadraticBounds">calcQuadraticBounds</a>((0, 0), (100, 0), (100, 100))<br>
|
||||
(0.0, 0.0, 100.0, 100.0)</tt></dd></dl>
|
||||
<dl><dt><a name="-calcQuadraticParameters"><strong>calcQuadraticParameters</strong></a>(pt1, pt2, pt3)</dt></dl>
|
||||
<dl><dt><a name="-calcQuadraticPoints"><strong>calcQuadraticPoints</strong></a>(a, b, c)</dt></dl>
|
||||
<dl><dt><a name="-cos"><strong>cos</strong></a>(...)</dt><dd><tt><a href="#-cos">cos</a>(x)<br>
|
||||
<br>
|
||||
Return the cosine of x (measured in radians).</tt></dd></dl>
|
||||
<dl><dt><a name="-printSegments"><strong>printSegments</strong></a>(segments)</dt><dd><tt>Helper for the doctests, displaying each segment in a list of<br>
|
||||
segments on a single line as a tuple.</tt></dd></dl>
|
||||
<dl><dt><a name="-solveCubic"><strong>solveCubic</strong></a>(a, b, c, d, abs<font color="#909090">=<built-in function abs></font>, pow<font color="#909090">=<built-in function pow></font>, sqrt<font color="#909090">=<built-in function sqrt></font>, cos<font color="#909090">=<built-in function cos></font>, acos<font color="#909090">=<built-in function acos></font>, pi<font color="#909090">=3.1415926535897931</font>)</dt><dd><tt>Solve a cubic equation where a, b, c and d are real.<br>
|
||||
a*x*x*x + b*x*x + c*x + d = 0<br>
|
||||
This function returns a list of roots. Note that the returned list<br>
|
||||
is neither guaranteed to be sorted nor to contain unique values!</tt></dd></dl>
|
||||
<dl><dt><a name="-solveQuadratic"><strong>solveQuadratic</strong></a>(a, b, c, sqrt<font color="#909090">=<built-in function sqrt></font>)</dt><dd><tt>Solve a quadratic equation where a, b and c are real.<br>
|
||||
a*x*x + b*x + c = 0<br>
|
||||
This function returns a list of roots. Note that the returned list<br>
|
||||
is neither guaranteed to be sorted nor to contain unique values!</tt></dd></dl>
|
||||
<dl><dt><a name="-splitCubic"><strong>splitCubic</strong></a>(pt1, pt2, pt3, pt4, where, isHorizontal)</dt><dd><tt>Split the cubic curve between pt1, pt2, pt3 and pt4 at position 'where',<br>
|
||||
which is an x coordinate if isHorizontal is False, a y coordinate if<br>
|
||||
isHorizontal is True. Return a list of curve segments.<br>
|
||||
<br>
|
||||
>>> <a href="#-printSegments">printSegments</a>(<a href="#-splitCubic">splitCubic</a>((0, 0), (25, 100), (75, 100), (100, 0), 150, False))<br>
|
||||
((0, 0), (25, 100), (75, 100), (100, 0))<br>
|
||||
>>> <a href="#-printSegments">printSegments</a>(<a href="#-splitCubic">splitCubic</a>((0, 0), (25, 100), (75, 100), (100, 0), 50, False))<br>
|
||||
((0.0, 0.0), (12.5, 50.0), (31.25, 75.0), (50.0, 75.0))<br>
|
||||
((50.0, 75.0), (68.75, 75.0), (87.5, 50.0), (100.0, 0.0))<br>
|
||||
>>> <a href="#-printSegments">printSegments</a>(<a href="#-splitCubic">splitCubic</a>((0, 0), (25, 100), (75, 100), (100, 0), 25, True))<br>
|
||||
((0.0, 0.0), (2.2937927384, 9.17517095361), (4.79804488188, 17.5085042869), (7.47413641001, 25.0))<br>
|
||||
((7.47413641001, 25.0), (31.2886200204, 91.6666666667), (68.7113799796, 91.6666666667), (92.52586359, 25.0))<br>
|
||||
((92.52586359, 25.0), (95.2019551181, 17.5085042869), (97.7062072616, 9.17517095361), (100.0, 1.7763568394e-15))</tt></dd></dl>
|
||||
<dl><dt><a name="-splitCubicAtT"><strong>splitCubicAtT</strong></a>(pt1, pt2, pt3, pt4, *ts)</dt><dd><tt>Split the cubic curve between pt1, pt2, pt3 and pt4 at one or more<br>
|
||||
values of t. Return a list of curve segments.<br>
|
||||
<br>
|
||||
>>> <a href="#-printSegments">printSegments</a>(<a href="#-splitCubicAtT">splitCubicAtT</a>((0, 0), (25, 100), (75, 100), (100, 0), 0.5))<br>
|
||||
((0.0, 0.0), (12.5, 50.0), (31.25, 75.0), (50.0, 75.0))<br>
|
||||
((50.0, 75.0), (68.75, 75.0), (87.5, 50.0), (100.0, 0.0))<br>
|
||||
>>> <a href="#-printSegments">printSegments</a>(<a href="#-splitCubicAtT">splitCubicAtT</a>((0, 0), (25, 100), (75, 100), (100, 0), 0.5, 0.75))<br>
|
||||
((0.0, 0.0), (12.5, 50.0), (31.25, 75.0), (50.0, 75.0))<br>
|
||||
((50.0, 75.0), (59.375, 75.0), (68.75, 68.75), (77.34375, 56.25))<br>
|
||||
((77.34375, 56.25), (85.9375, 43.75), (93.75, 25.0), (100.0, 0.0))</tt></dd></dl>
|
||||
<dl><dt><a name="-splitLine"><strong>splitLine</strong></a>(pt1, pt2, where, isHorizontal)</dt><dd><tt>Split the line between pt1 and pt2 at position 'where', which<br>
|
||||
is an x coordinate if isHorizontal is False, a y coordinate if<br>
|
||||
isHorizontal is True. Return a list of two line segments if the<br>
|
||||
line was successfully split, or a list containing the original<br>
|
||||
line.<br>
|
||||
<br>
|
||||
>>> <a href="#-printSegments">printSegments</a>(<a href="#-splitLine">splitLine</a>((0, 0), (100, 100), 50, True))<br>
|
||||
((0, 0), (50.0, 50.0))<br>
|
||||
((50.0, 50.0), (100, 100))<br>
|
||||
>>> <a href="#-printSegments">printSegments</a>(<a href="#-splitLine">splitLine</a>((0, 0), (100, 100), 100, True))<br>
|
||||
((0, 0), (100, 100))<br>
|
||||
>>> <a href="#-printSegments">printSegments</a>(<a href="#-splitLine">splitLine</a>((0, 0), (100, 100), 0, True))<br>
|
||||
((0, 0), (0.0, 0.0))<br>
|
||||
((0.0, 0.0), (100, 100))<br>
|
||||
>>> <a href="#-printSegments">printSegments</a>(<a href="#-splitLine">splitLine</a>((0, 0), (100, 100), 0, False))<br>
|
||||
((0, 0), (0.0, 0.0))<br>
|
||||
((0.0, 0.0), (100, 100))</tt></dd></dl>
|
||||
<dl><dt><a name="-splitQuadratic"><strong>splitQuadratic</strong></a>(pt1, pt2, pt3, where, isHorizontal)</dt><dd><tt>Split the quadratic curve between pt1, pt2 and pt3 at position 'where',<br>
|
||||
which is an x coordinate if isHorizontal is False, a y coordinate if<br>
|
||||
isHorizontal is True. Return a list of curve segments.<br>
|
||||
<br>
|
||||
>>> <a href="#-printSegments">printSegments</a>(<a href="#-splitQuadratic">splitQuadratic</a>((0, 0), (50, 100), (100, 0), 150, False))<br>
|
||||
((0, 0), (50, 100), (100, 0))<br>
|
||||
>>> <a href="#-printSegments">printSegments</a>(<a href="#-splitQuadratic">splitQuadratic</a>((0, 0), (50, 100), (100, 0), 50, False))<br>
|
||||
((0.0, 0.0), (25.0, 50.0), (50.0, 50.0))<br>
|
||||
((50.0, 50.0), (75.0, 50.0), (100.0, 0.0))<br>
|
||||
>>> <a href="#-printSegments">printSegments</a>(<a href="#-splitQuadratic">splitQuadratic</a>((0, 0), (50, 100), (100, 0), 25, False))<br>
|
||||
((0.0, 0.0), (12.5, 25.0), (25.0, 37.5))<br>
|
||||
((25.0, 37.5), (62.5, 75.0), (100.0, 0.0))<br>
|
||||
>>> <a href="#-printSegments">printSegments</a>(<a href="#-splitQuadratic">splitQuadratic</a>((0, 0), (50, 100), (100, 0), 25, True))<br>
|
||||
((0.0, 0.0), (7.32233047034, 14.6446609407), (14.6446609407, 25.0))<br>
|
||||
((14.6446609407, 25.0), (50.0, 75.0), (85.3553390593, 25.0))<br>
|
||||
((85.3553390593, 25.0), (92.6776695297, 14.6446609407), (100.0, -7.1054273576e-15))<br>
|
||||
>>> # XXX I'm not at all sure if the following behavior is desirable:<br>
|
||||
>>> <a href="#-printSegments">printSegments</a>(<a href="#-splitQuadratic">splitQuadratic</a>((0, 0), (50, 100), (100, 0), 50, True))<br>
|
||||
((0.0, 0.0), (25.0, 50.0), (50.0, 50.0))<br>
|
||||
((50.0, 50.0), (50.0, 50.0), (50.0, 50.0))<br>
|
||||
((50.0, 50.0), (75.0, 50.0), (100.0, 0.0))</tt></dd></dl>
|
||||
<dl><dt><a name="-splitQuadraticAtT"><strong>splitQuadraticAtT</strong></a>(pt1, pt2, pt3, *ts)</dt><dd><tt>Split the quadratic curve between pt1, pt2 and pt3 at one or more<br>
|
||||
values of t. Return a list of curve segments.<br>
|
||||
<br>
|
||||
>>> <a href="#-printSegments">printSegments</a>(<a href="#-splitQuadraticAtT">splitQuadraticAtT</a>((0, 0), (50, 100), (100, 0), 0.5))<br>
|
||||
((0.0, 0.0), (25.0, 50.0), (50.0, 50.0))<br>
|
||||
((50.0, 50.0), (75.0, 50.0), (100.0, 0.0))<br>
|
||||
>>> <a href="#-printSegments">printSegments</a>(<a href="#-splitQuadraticAtT">splitQuadraticAtT</a>((0, 0), (50, 100), (100, 0), 0.5, 0.75))<br>
|
||||
((0.0, 0.0), (25.0, 50.0), (50.0, 50.0))<br>
|
||||
((50.0, 50.0), (62.5, 50.0), (75.0, 37.5))<br>
|
||||
((75.0, 37.5), (87.5, 25.0), (100.0, 0.0))</tt></dd></dl>
|
||||
<dl><dt><a name="-sqrt"><strong>sqrt</strong></a>(...)</dt><dd><tt><a href="#-sqrt">sqrt</a>(x)<br>
|
||||
<br>
|
||||
Return the square root of x.</tt></dd></dl>
|
||||
</td></tr></table><p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#55aa55">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td>
|
||||
<td width="100%"><strong>__all__</strong> = ['calcQuadraticBounds', 'calcCubicBounds', 'splitLine', 'splitQuadratic', 'splitCubic', 'splitQuadraticAtT', 'splitCubicAtT', 'solveQuadratic', 'solveCubic']<br>
|
||||
<strong>epsilon</strong> = 9.9999999999999998e-13<br>
|
||||
<strong>pi</strong> = 3.1415926535897931</td></tr></table>
|
||||
</body></html>
|
41
Documentation/fontToolsDocs/fontTools.misc.eexec.html
Normal file
41
Documentation/fontToolsDocs/fontTools.misc.eexec.html
Normal file
@ -0,0 +1,41 @@
|
||||
|
||||
<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html><head><title>Python: module fontTools.misc.eexec</title>
|
||||
</head><body bgcolor="#f0f0f8">
|
||||
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
|
||||
<tr bgcolor="#7799ee">
|
||||
<td valign=bottom> <br>
|
||||
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong><a href="fontTools.html"><font color="#ffffff">fontTools</font></a>.<a href="fontTools.misc.html"><font color="#ffffff">misc</font></a>.eexec</strong></big></big></font></td
|
||||
><td align=right valign=bottom
|
||||
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/code/fontTools/Lib/fontTools/misc/eexec.py">/code/fontTools/Lib/fontTools/misc/eexec.py</a></font></td></tr></table>
|
||||
<p><tt>fontTools.misc.eexec.py -- Module implementing the eexec and <br>
|
||||
charstring encryption algorithm as used by PostScript Type 1 fonts.</tt></p>
|
||||
<p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#aa55cc">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td>
|
||||
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="string.html">string</a><br>
|
||||
</td><td width="25%" valign=top></td><td width="25%" valign=top></td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#eeaa77">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td>
|
||||
<td width="100%"><dl><dt><a name="-deHexString"><strong>deHexString</strong></a>(h)</dt></dl>
|
||||
<dl><dt><a name="-decrypt"><strong>decrypt</strong></a>(cipherstring, R)</dt></dl>
|
||||
<dl><dt><a name="-encrypt"><strong>encrypt</strong></a>(plainstring, R)</dt></dl>
|
||||
<dl><dt><a name="-hexString"><strong>hexString</strong></a>(s)</dt></dl>
|
||||
</td></tr></table><p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#55aa55">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td>
|
||||
<td width="100%"><strong>error</strong> = 'eexec.error'</td></tr></table>
|
||||
</body></html>
|
31
Documentation/fontToolsDocs/fontTools.misc.html
Normal file
31
Documentation/fontToolsDocs/fontTools.misc.html
Normal file
@ -0,0 +1,31 @@
|
||||
|
||||
<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html><head><title>Python: package fontTools.misc</title>
|
||||
</head><body bgcolor="#f0f0f8">
|
||||
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
|
||||
<tr bgcolor="#7799ee">
|
||||
<td valign=bottom> <br>
|
||||
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong><a href="fontTools.html"><font color="#ffffff">fontTools</font></a>.misc</strong></big></big></font></td
|
||||
><td align=right valign=bottom
|
||||
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/code/fontTools/Lib/fontTools/misc/__init__.py">/code/fontTools/Lib/fontTools/misc/__init__.py</a></font></td></tr></table>
|
||||
<p><tt>Empty __init__.py file to signal Python this directory is a package.<br>
|
||||
(It can't be completely empty since WinZip seems to skip empty files.)</tt></p>
|
||||
<p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#aa55cc">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#ffffff" face="helvetica, arial"><big><strong>Package Contents</strong></big></font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td>
|
||||
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="fontTools.misc.arrayTools.html">arrayTools</a><br>
|
||||
<a href="fontTools.misc.bezierTools.html">bezierTools</a><br>
|
||||
<a href="fontTools.misc.eexec.html">eexec</a><br>
|
||||
</td><td width="25%" valign=top><a href="fontTools.misc.homeResFile.html">homeResFile</a><br>
|
||||
<a href="fontTools.misc.psCharStrings.html">psCharStrings</a><br>
|
||||
<a href="fontTools.misc.psLib.html">psLib</a><br>
|
||||
</td><td width="25%" valign=top><a href="fontTools.misc.psOperators.html">psOperators</a><br>
|
||||
<a href="fontTools.misc.textTools.html">textTools</a><br>
|
||||
<a href="fontTools.misc.transform.html">transform</a><br>
|
||||
</td><td width="25%" valign=top></td></tr></table></td></tr></table>
|
||||
</body></html>
|
672
Documentation/fontToolsDocs/fontTools.misc.psCharStrings.html
Normal file
672
Documentation/fontToolsDocs/fontTools.misc.psCharStrings.html
Normal file
@ -0,0 +1,672 @@
|
||||
|
||||
<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html><head><title>Python: module fontTools.misc.psCharStrings</title>
|
||||
</head><body bgcolor="#f0f0f8">
|
||||
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
|
||||
<tr bgcolor="#7799ee">
|
||||
<td valign=bottom> <br>
|
||||
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong><a href="fontTools.html"><font color="#ffffff">fontTools</font></a>.<a href="fontTools.misc.html"><font color="#ffffff">misc</font></a>.psCharStrings</strong></big></big></font></td
|
||||
><td align=right valign=bottom
|
||||
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/code/fontTools/Lib/fontTools/misc/psCharStrings.py">/code/fontTools/Lib/fontTools/misc/psCharStrings.py</a></font></td></tr></table>
|
||||
<p><tt>psCharStrings.py -- module implementing various kinds of CharStrings: <br>
|
||||
CFF dictionary data and Type1/Type2 CharStrings.</tt></p>
|
||||
<p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#aa55cc">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td>
|
||||
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="string.html">string</a><br>
|
||||
</td><td width="25%" valign=top><a href="struct.html">struct</a><br>
|
||||
</td><td width="25%" valign=top><a href="types.html">types</a><br>
|
||||
</td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#ee77aa">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td>
|
||||
<td width="100%"><dl>
|
||||
<dt><font face="helvetica, arial"><a href="fontTools.misc.psCharStrings.html#ByteCodeBase">ByteCodeBase</a>
|
||||
</font></dt><dd>
|
||||
<dl>
|
||||
<dt><font face="helvetica, arial"><a href="fontTools.misc.psCharStrings.html#DictDecompiler">DictDecompiler</a>
|
||||
</font></dt><dt><font face="helvetica, arial"><a href="fontTools.misc.psCharStrings.html#T2CharString">T2CharString</a>
|
||||
</font></dt><dd>
|
||||
<dl>
|
||||
<dt><font face="helvetica, arial"><a href="fontTools.misc.psCharStrings.html#T1CharString">T1CharString</a>
|
||||
</font></dt></dl>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
<dt><font face="helvetica, arial"><a href="exceptions.html#Exception">exceptions.Exception</a>
|
||||
</font></dt><dd>
|
||||
<dl>
|
||||
<dt><font face="helvetica, arial"><a href="fontTools.misc.psCharStrings.html#CharStringCompileError">CharStringCompileError</a>
|
||||
</font></dt></dl>
|
||||
</dd>
|
||||
<dt><font face="helvetica, arial"><a href="fontTools.misc.psCharStrings.html#SimpleT2Decompiler">SimpleT2Decompiler</a>
|
||||
</font></dt><dd>
|
||||
<dl>
|
||||
<dt><font face="helvetica, arial"><a href="fontTools.misc.psCharStrings.html#T2OutlineExtractor">T2OutlineExtractor</a>
|
||||
</font></dt><dd>
|
||||
<dl>
|
||||
<dt><font face="helvetica, arial"><a href="fontTools.misc.psCharStrings.html#T1OutlineExtractor">T1OutlineExtractor</a>
|
||||
</font></dt></dl>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
</dl>
|
||||
<p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#ffc8d8">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#000000" face="helvetica, arial"><a name="ByteCodeBase">class <strong>ByteCodeBase</strong></a></font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
|
||||
<td width="100%">Methods defined here:<br>
|
||||
<dl><dt><a name="ByteCodeBase-read_byte"><strong>read_byte</strong></a>(self, b0, data, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="ByteCodeBase-read_fixed1616"><strong>read_fixed1616</strong></a>(self, b0, data, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="ByteCodeBase-read_longInt"><strong>read_longInt</strong></a>(self, b0, data, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="ByteCodeBase-read_realNumber"><strong>read_realNumber</strong></a>(self, b0, data, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="ByteCodeBase-read_shortInt"><strong>read_shortInt</strong></a>(self, b0, data, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="ByteCodeBase-read_smallInt1"><strong>read_smallInt1</strong></a>(self, b0, data, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="ByteCodeBase-read_smallInt2"><strong>read_smallInt2</strong></a>(self, b0, data, index)</dt></dl>
|
||||
|
||||
</td></tr></table> <p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#ffc8d8">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#000000" face="helvetica, arial"><a name="CharStringCompileError">class <strong>CharStringCompileError</strong></a>(<a href="exceptions.html#Exception">exceptions.Exception</a>)</font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
|
||||
<td width="100%">Methods inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
|
||||
<dl><dt><a name="CharStringCompileError-__getitem__"><strong>__getitem__</strong></a>(...)</dt></dl>
|
||||
|
||||
<dl><dt><a name="CharStringCompileError-__init__"><strong>__init__</strong></a>(...)</dt></dl>
|
||||
|
||||
<dl><dt><a name="CharStringCompileError-__str__"><strong>__str__</strong></a>(...)</dt></dl>
|
||||
|
||||
</td></tr></table> <p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#ffc8d8">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#000000" face="helvetica, arial"><a name="DictDecompiler">class <strong>DictDecompiler</strong></a>(<a href="fontTools.misc.psCharStrings.html#ByteCodeBase">ByteCodeBase</a>)</font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
|
||||
<td width="100%">Methods defined here:<br>
|
||||
<dl><dt><a name="DictDecompiler-__init__"><strong>__init__</strong></a>(self, strings)</dt></dl>
|
||||
|
||||
<dl><dt><a name="DictDecompiler-arg_SID"><strong>arg_SID</strong></a>(self, name)</dt></dl>
|
||||
|
||||
<dl><dt><a name="DictDecompiler-arg_array"><strong>arg_array</strong></a>(self, name)</dt></dl>
|
||||
|
||||
<dl><dt><a name="DictDecompiler-arg_delta"><strong>arg_delta</strong></a>(self, name)</dt></dl>
|
||||
|
||||
<dl><dt><a name="DictDecompiler-arg_number"><strong>arg_number</strong></a>(self, name)</dt></dl>
|
||||
|
||||
<dl><dt><a name="DictDecompiler-decompile"><strong>decompile</strong></a>(self, data)</dt></dl>
|
||||
|
||||
<dl><dt><a name="DictDecompiler-do_operator"><strong>do_operator</strong></a>(self, b0, data, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="DictDecompiler-getDict"><strong>getDict</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="DictDecompiler-handle_operator"><strong>handle_operator</strong></a>(self, operator, argType)</dt></dl>
|
||||
|
||||
<dl><dt><a name="DictDecompiler-pop"><strong>pop</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="DictDecompiler-popall"><strong>popall</strong></a>(self)</dt></dl>
|
||||
|
||||
<hr>
|
||||
Data and other attributes defined here:<br>
|
||||
<dl><dt><strong>operandEncoding</strong> = ['do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', ...]</dl>
|
||||
|
||||
<hr>
|
||||
Methods inherited from <a href="fontTools.misc.psCharStrings.html#ByteCodeBase">ByteCodeBase</a>:<br>
|
||||
<dl><dt><a name="DictDecompiler-read_byte"><strong>read_byte</strong></a>(self, b0, data, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="DictDecompiler-read_fixed1616"><strong>read_fixed1616</strong></a>(self, b0, data, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="DictDecompiler-read_longInt"><strong>read_longInt</strong></a>(self, b0, data, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="DictDecompiler-read_realNumber"><strong>read_realNumber</strong></a>(self, b0, data, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="DictDecompiler-read_shortInt"><strong>read_shortInt</strong></a>(self, b0, data, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="DictDecompiler-read_smallInt1"><strong>read_smallInt1</strong></a>(self, b0, data, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="DictDecompiler-read_smallInt2"><strong>read_smallInt2</strong></a>(self, b0, data, index)</dt></dl>
|
||||
|
||||
</td></tr></table> <p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#ffc8d8">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#000000" face="helvetica, arial"><a name="SimpleT2Decompiler">class <strong>SimpleT2Decompiler</strong></a></font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
|
||||
<td width="100%">Methods defined here:<br>
|
||||
<dl><dt><a name="SimpleT2Decompiler-__init__"><strong>__init__</strong></a>(self, localSubrs, globalSubrs)</dt></dl>
|
||||
|
||||
<dl><dt><a name="SimpleT2Decompiler-countHints"><strong>countHints</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="SimpleT2Decompiler-execute"><strong>execute</strong></a>(self, charString)</dt></dl>
|
||||
|
||||
<dl><dt><a name="SimpleT2Decompiler-op_callgsubr"><strong>op_callgsubr</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="SimpleT2Decompiler-op_callsubr"><strong>op_callsubr</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="SimpleT2Decompiler-op_cntrmask"><strong>op_cntrmask</strong></a> = <a href="#SimpleT2Decompiler-op_hintmask">op_hintmask</a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="SimpleT2Decompiler-op_endchar"><strong>op_endchar</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="SimpleT2Decompiler-op_hintmask"><strong>op_hintmask</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="SimpleT2Decompiler-op_hstem"><strong>op_hstem</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="SimpleT2Decompiler-op_hstemhm"><strong>op_hstemhm</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="SimpleT2Decompiler-op_return"><strong>op_return</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="SimpleT2Decompiler-op_vstem"><strong>op_vstem</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="SimpleT2Decompiler-op_vstemhm"><strong>op_vstemhm</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="SimpleT2Decompiler-pop"><strong>pop</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="SimpleT2Decompiler-popall"><strong>popall</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="SimpleT2Decompiler-push"><strong>push</strong></a>(self, value)</dt></dl>
|
||||
|
||||
<dl><dt><a name="SimpleT2Decompiler-reset"><strong>reset</strong></a>(self)</dt></dl>
|
||||
|
||||
</td></tr></table> <p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#ffc8d8">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#000000" face="helvetica, arial"><a name="T1CharString">class <strong>T1CharString</strong></a>(<a href="fontTools.misc.psCharStrings.html#T2CharString">T2CharString</a>)</font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
|
||||
<td width="100%"><dl><dt>Method resolution order:</dt>
|
||||
<dd><a href="fontTools.misc.psCharStrings.html#T1CharString">T1CharString</a></dd>
|
||||
<dd><a href="fontTools.misc.psCharStrings.html#T2CharString">T2CharString</a></dd>
|
||||
<dd><a href="fontTools.misc.psCharStrings.html#ByteCodeBase">ByteCodeBase</a></dd>
|
||||
</dl>
|
||||
<hr>
|
||||
Methods defined here:<br>
|
||||
<dl><dt><a name="T1CharString-__init__"><strong>__init__</strong></a>(self, bytecode<font color="#909090">=None</font>, program<font color="#909090">=None</font>, subrs<font color="#909090">=None</font>)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T1CharString-decompile"><strong>decompile</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T1CharString-draw"><strong>draw</strong></a>(self, pen)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T1CharString-getFixedEncoder"><strong>getFixedEncoder</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T1CharString-getIntEncoder"><strong>getIntEncoder</strong></a>(self)</dt></dl>
|
||||
|
||||
<hr>
|
||||
Data and other attributes defined here:<br>
|
||||
<dl><dt><strong>opcodes</strong> = {'callothersubr': (12, 16), 'callsubr': (10,), 'closepath': (9,), 'div': (12, 12), 'dotsection': (12, 0), 'endchar': (14,), 'hlineto': (6,), 'hmoveto': (22,), 'hsbw': (13,), 'hstem': (1,), ...}</dl>
|
||||
|
||||
<dl><dt><strong>operandEncoding</strong> = ['do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', ...]</dl>
|
||||
|
||||
<dl><dt><strong>operators</strong> = {1: 'hstem', 3: 'vstem', 4: 'vmoveto', 5: 'rlineto', 6: 'hlineto', 7: 'vlineto', 8: 'rrcurveto', 9: 'closepath', 10: 'callsubr', 11: 'return', ...}</dl>
|
||||
|
||||
<hr>
|
||||
Methods inherited from <a href="fontTools.misc.psCharStrings.html#T2CharString">T2CharString</a>:<br>
|
||||
<dl><dt><a name="T1CharString-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T1CharString-compile"><strong>compile</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T1CharString-do_operator"><strong>do_operator</strong></a>(self, b0, data, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T1CharString-fromXML"><strong>fromXML</strong></a>(self, (name, attrs, content))</dt></dl>
|
||||
|
||||
<dl><dt><a name="T1CharString-getBytes"><strong>getBytes</strong></a>(self, index, nBytes)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T1CharString-getToken"><strong>getToken</strong></a>(self, index, len<font color="#909090">=<built-in function len></font>, ord<font color="#909090">=<built-in function ord></font>, getattr<font color="#909090">=<built-in function getattr></font>, type<font color="#909090">=<type 'type'></font>, StringType<font color="#909090">=<type 'str'></font>)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T1CharString-needsDecompilation"><strong>needsDecompilation</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T1CharString-setBytecode"><strong>setBytecode</strong></a>(self, bytecode)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T1CharString-setProgram"><strong>setProgram</strong></a>(self, program)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T1CharString-toXML"><strong>toXML</strong></a>(self, xmlWriter)</dt></dl>
|
||||
|
||||
<hr>
|
||||
Methods inherited from <a href="fontTools.misc.psCharStrings.html#ByteCodeBase">ByteCodeBase</a>:<br>
|
||||
<dl><dt><a name="T1CharString-read_byte"><strong>read_byte</strong></a>(self, b0, data, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T1CharString-read_fixed1616"><strong>read_fixed1616</strong></a>(self, b0, data, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T1CharString-read_longInt"><strong>read_longInt</strong></a>(self, b0, data, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T1CharString-read_realNumber"><strong>read_realNumber</strong></a>(self, b0, data, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T1CharString-read_shortInt"><strong>read_shortInt</strong></a>(self, b0, data, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T1CharString-read_smallInt1"><strong>read_smallInt1</strong></a>(self, b0, data, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T1CharString-read_smallInt2"><strong>read_smallInt2</strong></a>(self, b0, data, index)</dt></dl>
|
||||
|
||||
</td></tr></table> <p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#ffc8d8">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#000000" face="helvetica, arial"><a name="T1OutlineExtractor">class <strong>T1OutlineExtractor</strong></a>(<a href="fontTools.misc.psCharStrings.html#T2OutlineExtractor">T2OutlineExtractor</a>)</font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
|
||||
<td width="100%"><dl><dt>Method resolution order:</dt>
|
||||
<dd><a href="fontTools.misc.psCharStrings.html#T1OutlineExtractor">T1OutlineExtractor</a></dd>
|
||||
<dd><a href="fontTools.misc.psCharStrings.html#T2OutlineExtractor">T2OutlineExtractor</a></dd>
|
||||
<dd><a href="fontTools.misc.psCharStrings.html#SimpleT2Decompiler">SimpleT2Decompiler</a></dd>
|
||||
</dl>
|
||||
<hr>
|
||||
Methods defined here:<br>
|
||||
<dl><dt><a name="T1OutlineExtractor-__init__"><strong>__init__</strong></a>(self, pen, subrs)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T1OutlineExtractor-doFlex"><strong>doFlex</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T1OutlineExtractor-endPath"><strong>endPath</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T1OutlineExtractor-exch"><strong>exch</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T1OutlineExtractor-op_callothersubr"><strong>op_callothersubr</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T1OutlineExtractor-op_callsubr"><strong>op_callsubr</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T1OutlineExtractor-op_closepath"><strong>op_closepath</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T1OutlineExtractor-op_dotsection"><strong>op_dotsection</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T1OutlineExtractor-op_endchar"><strong>op_endchar</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T1OutlineExtractor-op_hmoveto"><strong>op_hmoveto</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T1OutlineExtractor-op_hsbw"><strong>op_hsbw</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T1OutlineExtractor-op_hstem3"><strong>op_hstem3</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T1OutlineExtractor-op_pop"><strong>op_pop</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T1OutlineExtractor-op_rmoveto"><strong>op_rmoveto</strong></a>(self, index)</dt><dd><tt># path constructors</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="T1OutlineExtractor-op_sbw"><strong>op_sbw</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T1OutlineExtractor-op_seac"><strong>op_seac</strong></a>(self, index)</dt><dd><tt>asb adx ady bchar achar seac</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="T1OutlineExtractor-op_setcurrentpoint"><strong>op_setcurrentpoint</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T1OutlineExtractor-op_vmoveto"><strong>op_vmoveto</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T1OutlineExtractor-op_vstem3"><strong>op_vstem3</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T1OutlineExtractor-popallWidth"><strong>popallWidth</strong></a>(self, evenOdd<font color="#909090">=0</font>)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T1OutlineExtractor-reset"><strong>reset</strong></a>(self)</dt></dl>
|
||||
|
||||
<hr>
|
||||
Methods inherited from <a href="fontTools.misc.psCharStrings.html#T2OutlineExtractor">T2OutlineExtractor</a>:<br>
|
||||
<dl><dt><a name="T1OutlineExtractor-alternatingLineto"><strong>alternatingLineto</strong></a>(self, isHorizontal)</dt><dd><tt># miscelaneous helpers</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="T1OutlineExtractor-closePath"><strong>closePath</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T1OutlineExtractor-countHints"><strong>countHints</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T1OutlineExtractor-hcurveto"><strong>hcurveto</strong></a>(self, args)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T1OutlineExtractor-op_abs"><strong>op_abs</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T1OutlineExtractor-op_add"><strong>op_add</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T1OutlineExtractor-op_and"><strong>op_and</strong></a>(self, index)</dt><dd><tt># misc</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="T1OutlineExtractor-op_blend"><strong>op_blend</strong></a>(self, index)</dt><dd><tt># MultipleMaster. Well...</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="T1OutlineExtractor-op_div"><strong>op_div</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T1OutlineExtractor-op_drop"><strong>op_drop</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T1OutlineExtractor-op_dup"><strong>op_dup</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T1OutlineExtractor-op_eq"><strong>op_eq</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T1OutlineExtractor-op_exch"><strong>op_exch</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T1OutlineExtractor-op_flex"><strong>op_flex</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T1OutlineExtractor-op_flex1"><strong>op_flex1</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T1OutlineExtractor-op_get"><strong>op_get</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T1OutlineExtractor-op_hflex"><strong>op_hflex</strong></a>(self, index)</dt><dd><tt># path constructors, flex</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="T1OutlineExtractor-op_hflex1"><strong>op_hflex1</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T1OutlineExtractor-op_hhcurveto"><strong>op_hhcurveto</strong></a>(self, index)</dt><dd><tt>dy1? {dxa dxb dyb dxc}+ hhcurveto</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="T1OutlineExtractor-op_hlineto"><strong>op_hlineto</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T1OutlineExtractor-op_hvcurveto"><strong>op_hvcurveto</strong></a>(self, index)</dt><dd><tt>dx1 dx2 dy2 dy3 {dya dxb dyb dxc dxd dxe dye dyf}* dxf?<br>
|
||||
{dxa dxb dyb dyc dyd dxe dye dxf}+ dyf?</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="T1OutlineExtractor-op_ifelse"><strong>op_ifelse</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T1OutlineExtractor-op_index"><strong>op_index</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T1OutlineExtractor-op_load"><strong>op_load</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T1OutlineExtractor-op_mul"><strong>op_mul</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T1OutlineExtractor-op_neg"><strong>op_neg</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T1OutlineExtractor-op_not"><strong>op_not</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T1OutlineExtractor-op_or"><strong>op_or</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T1OutlineExtractor-op_put"><strong>op_put</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T1OutlineExtractor-op_random"><strong>op_random</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T1OutlineExtractor-op_rcurveline"><strong>op_rcurveline</strong></a>(self, index)</dt><dd><tt>{dxa dya dxb dyb dxc dyc}+ dxd dyd rcurveline</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="T1OutlineExtractor-op_rlinecurve"><strong>op_rlinecurve</strong></a>(self, index)</dt><dd><tt>{dxa dya}+ dxb dyb dxc dyc dxd dyd rlinecurve</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="T1OutlineExtractor-op_rlineto"><strong>op_rlineto</strong></a>(self, index)</dt><dd><tt># path constructors, lines</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="T1OutlineExtractor-op_roll"><strong>op_roll</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T1OutlineExtractor-op_rrcurveto"><strong>op_rrcurveto</strong></a>(self, index)</dt><dd><tt>{dxa dya dxb dyb dxc dyc}+ rrcurveto</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="T1OutlineExtractor-op_sqrt"><strong>op_sqrt</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T1OutlineExtractor-op_store"><strong>op_store</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T1OutlineExtractor-op_sub"><strong>op_sub</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T1OutlineExtractor-op_vhcurveto"><strong>op_vhcurveto</strong></a>(self, index)</dt><dd><tt>dy1 dx2 dy2 dx3 {dxa dxb dyb dyc dyd dxe dye dxf}* dyf? vhcurveto (30)<br>
|
||||
{dya dxb dyb dxc dxd dxe dye dyf}+ dxf? vhcurveto</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="T1OutlineExtractor-op_vlineto"><strong>op_vlineto</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T1OutlineExtractor-op_vvcurveto"><strong>op_vvcurveto</strong></a>(self, index)</dt><dd><tt>dx1? {dya dxb dyb dyc}+ vvcurveto</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="T1OutlineExtractor-rCurveTo"><strong>rCurveTo</strong></a>(self, pt1, pt2, pt3)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T1OutlineExtractor-rLineTo"><strong>rLineTo</strong></a>(self, point)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T1OutlineExtractor-rMoveTo"><strong>rMoveTo</strong></a>(self, point)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T1OutlineExtractor-vcurveto"><strong>vcurveto</strong></a>(self, args)</dt></dl>
|
||||
|
||||
<hr>
|
||||
Methods inherited from <a href="fontTools.misc.psCharStrings.html#SimpleT2Decompiler">SimpleT2Decompiler</a>:<br>
|
||||
<dl><dt><a name="T1OutlineExtractor-execute"><strong>execute</strong></a>(self, charString)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T1OutlineExtractor-op_callgsubr"><strong>op_callgsubr</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T1OutlineExtractor-op_cntrmask"><strong>op_cntrmask</strong></a> = op_hintmask(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T1OutlineExtractor-op_hintmask"><strong>op_hintmask</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T1OutlineExtractor-op_hstem"><strong>op_hstem</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T1OutlineExtractor-op_hstemhm"><strong>op_hstemhm</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T1OutlineExtractor-op_return"><strong>op_return</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T1OutlineExtractor-op_vstem"><strong>op_vstem</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T1OutlineExtractor-op_vstemhm"><strong>op_vstemhm</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T1OutlineExtractor-pop"><strong>pop</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T1OutlineExtractor-popall"><strong>popall</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T1OutlineExtractor-push"><strong>push</strong></a>(self, value)</dt></dl>
|
||||
|
||||
</td></tr></table> <p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#ffc8d8">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#000000" face="helvetica, arial"><a name="T2CharString">class <strong>T2CharString</strong></a>(<a href="fontTools.misc.psCharStrings.html#ByteCodeBase">ByteCodeBase</a>)</font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
|
||||
<td width="100%">Methods defined here:<br>
|
||||
<dl><dt><a name="T2CharString-__init__"><strong>__init__</strong></a>(self, bytecode<font color="#909090">=None</font>, program<font color="#909090">=None</font>, private<font color="#909090">=None</font>, globalSubrs<font color="#909090">=None</font>)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T2CharString-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T2CharString-compile"><strong>compile</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T2CharString-decompile"><strong>decompile</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T2CharString-do_operator"><strong>do_operator</strong></a>(self, b0, data, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T2CharString-draw"><strong>draw</strong></a>(self, pen)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T2CharString-fromXML"><strong>fromXML</strong></a>(self, (name, attrs, content))</dt></dl>
|
||||
|
||||
<dl><dt><a name="T2CharString-getBytes"><strong>getBytes</strong></a>(self, index, nBytes)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T2CharString-getFixedEncoder"><strong>getFixedEncoder</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T2CharString-getIntEncoder"><strong>getIntEncoder</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T2CharString-getToken"><strong>getToken</strong></a>(self, index, len<font color="#909090">=<built-in function len></font>, ord<font color="#909090">=<built-in function ord></font>, getattr<font color="#909090">=<built-in function getattr></font>, type<font color="#909090">=<type 'type'></font>, StringType<font color="#909090">=<type 'str'></font>)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T2CharString-needsDecompilation"><strong>needsDecompilation</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T2CharString-setBytecode"><strong>setBytecode</strong></a>(self, bytecode)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T2CharString-setProgram"><strong>setProgram</strong></a>(self, program)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T2CharString-toXML"><strong>toXML</strong></a>(self, xmlWriter)</dt></dl>
|
||||
|
||||
<hr>
|
||||
Data and other attributes defined here:<br>
|
||||
<dl><dt><strong>opcodes</strong> = {'abs': (12, 9), 'add': (12, 10), 'and': (12, 3), 'blend': (16,), 'callgsubr': (29,), 'callsubr': (10,), 'cntrmask': (20,), 'div': (12, 12), 'drop': (12, 18), 'dup': (12, 27), ...}</dl>
|
||||
|
||||
<dl><dt><strong>operandEncoding</strong> = ['do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', ...]</dl>
|
||||
|
||||
<dl><dt><strong>operators</strong> = {1: 'hstem', 3: 'vstem', 4: 'vmoveto', 5: 'rlineto', 6: 'hlineto', 7: 'vlineto', 8: 'rrcurveto', 10: 'callsubr', 11: 'return', 14: 'endchar', ...}</dl>
|
||||
|
||||
<hr>
|
||||
Methods inherited from <a href="fontTools.misc.psCharStrings.html#ByteCodeBase">ByteCodeBase</a>:<br>
|
||||
<dl><dt><a name="T2CharString-read_byte"><strong>read_byte</strong></a>(self, b0, data, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T2CharString-read_fixed1616"><strong>read_fixed1616</strong></a>(self, b0, data, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T2CharString-read_longInt"><strong>read_longInt</strong></a>(self, b0, data, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T2CharString-read_realNumber"><strong>read_realNumber</strong></a>(self, b0, data, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T2CharString-read_shortInt"><strong>read_shortInt</strong></a>(self, b0, data, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T2CharString-read_smallInt1"><strong>read_smallInt1</strong></a>(self, b0, data, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T2CharString-read_smallInt2"><strong>read_smallInt2</strong></a>(self, b0, data, index)</dt></dl>
|
||||
|
||||
</td></tr></table> <p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#ffc8d8">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#000000" face="helvetica, arial"><a name="T2OutlineExtractor">class <strong>T2OutlineExtractor</strong></a>(<a href="fontTools.misc.psCharStrings.html#SimpleT2Decompiler">SimpleT2Decompiler</a>)</font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
|
||||
<td width="100%">Methods defined here:<br>
|
||||
<dl><dt><a name="T2OutlineExtractor-__init__"><strong>__init__</strong></a>(self, pen, localSubrs, globalSubrs, nominalWidthX, defaultWidthX)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T2OutlineExtractor-alternatingLineto"><strong>alternatingLineto</strong></a>(self, isHorizontal)</dt><dd><tt># miscelaneous helpers</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="T2OutlineExtractor-closePath"><strong>closePath</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T2OutlineExtractor-countHints"><strong>countHints</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T2OutlineExtractor-endPath"><strong>endPath</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T2OutlineExtractor-hcurveto"><strong>hcurveto</strong></a>(self, args)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T2OutlineExtractor-op_abs"><strong>op_abs</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T2OutlineExtractor-op_add"><strong>op_add</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T2OutlineExtractor-op_and"><strong>op_and</strong></a>(self, index)</dt><dd><tt># misc</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="T2OutlineExtractor-op_blend"><strong>op_blend</strong></a>(self, index)</dt><dd><tt># MultipleMaster. Well...</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="T2OutlineExtractor-op_div"><strong>op_div</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T2OutlineExtractor-op_drop"><strong>op_drop</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T2OutlineExtractor-op_dup"><strong>op_dup</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T2OutlineExtractor-op_endchar"><strong>op_endchar</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T2OutlineExtractor-op_eq"><strong>op_eq</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T2OutlineExtractor-op_exch"><strong>op_exch</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T2OutlineExtractor-op_flex"><strong>op_flex</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T2OutlineExtractor-op_flex1"><strong>op_flex1</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T2OutlineExtractor-op_get"><strong>op_get</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T2OutlineExtractor-op_hflex"><strong>op_hflex</strong></a>(self, index)</dt><dd><tt># path constructors, flex</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="T2OutlineExtractor-op_hflex1"><strong>op_hflex1</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T2OutlineExtractor-op_hhcurveto"><strong>op_hhcurveto</strong></a>(self, index)</dt><dd><tt>dy1? {dxa dxb dyb dxc}+ hhcurveto</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="T2OutlineExtractor-op_hlineto"><strong>op_hlineto</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T2OutlineExtractor-op_hmoveto"><strong>op_hmoveto</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T2OutlineExtractor-op_hvcurveto"><strong>op_hvcurveto</strong></a>(self, index)</dt><dd><tt>dx1 dx2 dy2 dy3 {dya dxb dyb dxc dxd dxe dye dyf}* dxf?<br>
|
||||
{dxa dxb dyb dyc dyd dxe dye dxf}+ dyf?</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="T2OutlineExtractor-op_ifelse"><strong>op_ifelse</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T2OutlineExtractor-op_index"><strong>op_index</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T2OutlineExtractor-op_load"><strong>op_load</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T2OutlineExtractor-op_mul"><strong>op_mul</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T2OutlineExtractor-op_neg"><strong>op_neg</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T2OutlineExtractor-op_not"><strong>op_not</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T2OutlineExtractor-op_or"><strong>op_or</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T2OutlineExtractor-op_put"><strong>op_put</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T2OutlineExtractor-op_random"><strong>op_random</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T2OutlineExtractor-op_rcurveline"><strong>op_rcurveline</strong></a>(self, index)</dt><dd><tt>{dxa dya dxb dyb dxc dyc}+ dxd dyd rcurveline</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="T2OutlineExtractor-op_rlinecurve"><strong>op_rlinecurve</strong></a>(self, index)</dt><dd><tt>{dxa dya}+ dxb dyb dxc dyc dxd dyd rlinecurve</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="T2OutlineExtractor-op_rlineto"><strong>op_rlineto</strong></a>(self, index)</dt><dd><tt># path constructors, lines</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="T2OutlineExtractor-op_rmoveto"><strong>op_rmoveto</strong></a>(self, index)</dt><dd><tt># path constructors, moveto</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="T2OutlineExtractor-op_roll"><strong>op_roll</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T2OutlineExtractor-op_rrcurveto"><strong>op_rrcurveto</strong></a>(self, index)</dt><dd><tt>{dxa dya dxb dyb dxc dyc}+ rrcurveto</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="T2OutlineExtractor-op_sqrt"><strong>op_sqrt</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T2OutlineExtractor-op_store"><strong>op_store</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T2OutlineExtractor-op_sub"><strong>op_sub</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T2OutlineExtractor-op_vhcurveto"><strong>op_vhcurveto</strong></a>(self, index)</dt><dd><tt>dy1 dx2 dy2 dx3 {dxa dxb dyb dyc dyd dxe dye dxf}* dyf? vhcurveto (30)<br>
|
||||
{dya dxb dyb dxc dxd dxe dye dyf}+ dxf? vhcurveto</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="T2OutlineExtractor-op_vlineto"><strong>op_vlineto</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T2OutlineExtractor-op_vmoveto"><strong>op_vmoveto</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T2OutlineExtractor-op_vvcurveto"><strong>op_vvcurveto</strong></a>(self, index)</dt><dd><tt>dx1? {dya dxb dyb dyc}+ vvcurveto</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="T2OutlineExtractor-popallWidth"><strong>popallWidth</strong></a>(self, evenOdd<font color="#909090">=0</font>)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T2OutlineExtractor-rCurveTo"><strong>rCurveTo</strong></a>(self, pt1, pt2, pt3)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T2OutlineExtractor-rLineTo"><strong>rLineTo</strong></a>(self, point)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T2OutlineExtractor-rMoveTo"><strong>rMoveTo</strong></a>(self, point)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T2OutlineExtractor-reset"><strong>reset</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T2OutlineExtractor-vcurveto"><strong>vcurveto</strong></a>(self, args)</dt></dl>
|
||||
|
||||
<hr>
|
||||
Methods inherited from <a href="fontTools.misc.psCharStrings.html#SimpleT2Decompiler">SimpleT2Decompiler</a>:<br>
|
||||
<dl><dt><a name="T2OutlineExtractor-execute"><strong>execute</strong></a>(self, charString)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T2OutlineExtractor-op_callgsubr"><strong>op_callgsubr</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T2OutlineExtractor-op_callsubr"><strong>op_callsubr</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T2OutlineExtractor-op_cntrmask"><strong>op_cntrmask</strong></a> = op_hintmask(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T2OutlineExtractor-op_hintmask"><strong>op_hintmask</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T2OutlineExtractor-op_hstem"><strong>op_hstem</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T2OutlineExtractor-op_hstemhm"><strong>op_hstemhm</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T2OutlineExtractor-op_return"><strong>op_return</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T2OutlineExtractor-op_vstem"><strong>op_vstem</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T2OutlineExtractor-op_vstemhm"><strong>op_vstemhm</strong></a>(self, index)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T2OutlineExtractor-pop"><strong>pop</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T2OutlineExtractor-popall"><strong>popall</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="T2OutlineExtractor-push"><strong>push</strong></a>(self, value)</dt></dl>
|
||||
|
||||
</td></tr></table></td></tr></table><p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#eeaa77">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td>
|
||||
<td width="100%"><dl><dt><a name="-buildOperatorDict"><strong>buildOperatorDict</strong></a>(operatorList)</dt></dl>
|
||||
<dl><dt><a name="-calcSubrBias"><strong>calcSubrBias</strong></a>(subrs)</dt></dl>
|
||||
<dl><dt><a name="-encodeFixed"><strong>encodeFixed</strong></a>(f, pack<font color="#909090">=<built-in function pack></font>)</dt></dl>
|
||||
<dl><dt><a name="-encodeFloat"><strong>encodeFloat</strong></a>(f)</dt></dl>
|
||||
<dl><dt><a name="-encodeIntCFF"><strong>encodeIntCFF</strong></a> = encodeInt(value, fourByteOp<font color="#909090">='<font color="#c040c0">\x1d</font>'</font>, chr<font color="#909090">=<built-in function chr></font>, pack<font color="#909090">=<built-in function pack></font>, unpack<font color="#909090">=<built-in function unpack></font>)</dt></dl>
|
||||
<dl><dt><a name="-encodeIntT1"><strong>encodeIntT1</strong></a> = encodeInt(value, fourByteOp<font color="#909090">='<font color="#c040c0">\xff</font>'</font>, chr<font color="#909090">=<built-in function chr></font>, pack<font color="#909090">=<built-in function pack></font>, unpack<font color="#909090">=<built-in function unpack></font>)</dt></dl>
|
||||
<dl><dt><a name="-encodeIntT2"><strong>encodeIntT2</strong></a> = encodeInt(value, fourByteOp<font color="#909090">=None</font>, chr<font color="#909090">=<built-in function chr></font>, pack<font color="#909090">=<built-in function pack></font>, unpack<font color="#909090">=<built-in function unpack></font>)</dt></dl>
|
||||
<dl><dt><a name="-getIntEncoder"><strong>getIntEncoder</strong></a>(format)</dt></dl>
|
||||
</td></tr></table><p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#55aa55">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td>
|
||||
<td width="100%"><strong>DEBUG</strong> = 0<br>
|
||||
<strong>cffDictOperandEncoding</strong> = ['do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', ...]<br>
|
||||
<strong>realNibbles</strong> = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '.', 'E', 'E-', None, '-']<br>
|
||||
<strong>realNibblesDict</strong> = {None: 13, '-': 14, '.': 10, '0': 0, '1': 1, '2': 2, '3': 3, '4': 4, '5': 5, '6': 6, ...}<br>
|
||||
<strong>t1OperandEncoding</strong> = ['do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', ...]<br>
|
||||
<strong>t1Operators</strong> = [(1, 'hstem'), (3, 'vstem'), (4, 'vmoveto'), (5, 'rlineto'), (6, 'hlineto'), (7, 'vlineto'), (8, 'rrcurveto'), (9, 'closepath'), (10, 'callsubr'), (11, 'return'), (13, 'hsbw'), (14, 'endchar'), (21, 'rmoveto'), (22, 'hmoveto'), (30, 'vhcurveto'), (31, 'hvcurveto'), ((12, 0), 'dotsection'), ((12, 1), 'vstem3'), ((12, 2), 'hstem3'), ((12, 6), 'seac'), ...]<br>
|
||||
<strong>t2OperandEncoding</strong> = ['do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', 'do_operator', ...]<br>
|
||||
<strong>t2Operators</strong> = [(1, 'hstem'), (3, 'vstem'), (4, 'vmoveto'), (5, 'rlineto'), (6, 'hlineto'), (7, 'vlineto'), (8, 'rrcurveto'), (10, 'callsubr'), (11, 'return'), (14, 'endchar'), (16, 'blend'), (18, 'hstemhm'), (19, 'hintmask'), (20, 'cntrmask'), (21, 'rmoveto'), (22, 'hmoveto'), (23, 'vstemhm'), (24, 'rcurveline'), (25, 'rlinecurve'), (26, 'vvcurveto'), ...]</td></tr></table>
|
||||
</body></html>
|
272
Documentation/fontToolsDocs/fontTools.misc.psLib.html
Normal file
272
Documentation/fontToolsDocs/fontTools.misc.psLib.html
Normal file
@ -0,0 +1,272 @@
|
||||
|
||||
<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html><head><title>Python: module fontTools.misc.psLib</title>
|
||||
</head><body bgcolor="#f0f0f8">
|
||||
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
|
||||
<tr bgcolor="#7799ee">
|
||||
<td valign=bottom> <br>
|
||||
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong><a href="fontTools.html"><font color="#ffffff">fontTools</font></a>.<a href="fontTools.misc.html"><font color="#ffffff">misc</font></a>.psLib</strong></big></big></font></td
|
||||
><td align=right valign=bottom
|
||||
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/code/fontTools/Lib/fontTools/misc/psLib.py">/code/fontTools/Lib/fontTools/misc/psLib.py</a></font></td></tr></table>
|
||||
<p></p>
|
||||
<p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#aa55cc">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td>
|
||||
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="StringIO.html">StringIO</a><br>
|
||||
</td><td width="25%" valign=top><a href="fontTools.misc.eexec.html">fontTools.misc.eexec</a><br>
|
||||
</td><td width="25%" valign=top><a href="re.html">re</a><br>
|
||||
</td><td width="25%" valign=top><a href="types.html">types</a><br>
|
||||
</td></tr></table></td></tr></table><p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#ee77aa">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td>
|
||||
<td width="100%"><dl>
|
||||
<dt><font face="helvetica, arial"><a href="fontTools.misc.psOperators.html#PSOperators">fontTools.misc.psOperators.PSOperators</a>
|
||||
</font></dt><dd>
|
||||
<dl>
|
||||
<dt><font face="helvetica, arial"><a href="fontTools.misc.psLib.html#PSInterpreter">PSInterpreter</a>
|
||||
</font></dt></dl>
|
||||
</dd>
|
||||
<dt><font face="helvetica, arial"><a href="StringIO.html#StringIO">StringIO.StringIO</a>
|
||||
</font></dt><dd>
|
||||
<dl>
|
||||
<dt><font face="helvetica, arial"><a href="fontTools.misc.psLib.html#PSTokenizer">PSTokenizer</a>
|
||||
</font></dt></dl>
|
||||
</dd>
|
||||
</dl>
|
||||
<p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#ffc8d8">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#000000" face="helvetica, arial"><a name="PSInterpreter">class <strong>PSInterpreter</strong></a>(<a href="fontTools.misc.psOperators.html#PSOperators">fontTools.misc.psOperators.PSOperators</a>)</font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
|
||||
<td width="100%">Methods defined here:<br>
|
||||
<dl><dt><a name="PSInterpreter-__init__"><strong>__init__</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSInterpreter-call_procedure"><strong>call_procedure</strong></a>(self, proc)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSInterpreter-close"><strong>close</strong></a>(self)</dt><dd><tt>Remove circular references.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="PSInterpreter-do_comment"><strong>do_comment</strong></a>(self, token)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSInterpreter-do_hexstring"><strong>do_hexstring</strong></a>(self, token)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSInterpreter-do_literal"><strong>do_literal</strong></a>(self, token)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSInterpreter-do_makearray"><strong>do_makearray</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSInterpreter-do_special"><strong>do_special</strong></a>(self, token)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSInterpreter-do_string"><strong>do_string</strong></a>(self, token)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSInterpreter-do_token"><strong>do_token</strong></a>(self, token, int<font color="#909090">=<type 'int'></font>, float<font color="#909090">=<type 'float'></font>, ps_name<font color="#909090">=<class fontTools.misc.psOperators.ps_name at 0x15be5a0></font>, ps_integer<font color="#909090">=<class fontTools.misc.psOperators.ps_integer at 0x15be6c0></font>, ps_real<font color="#909090">=<class fontTools.misc.psOperators.ps_real at 0x15be6f0></font>)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSInterpreter-fillsystemdict"><strong>fillsystemdict</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSInterpreter-handle_object"><strong>handle_object</strong></a>(self, object)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSInterpreter-interpret"><strong>interpret</strong></a>(self, data, getattr<font color="#909090">=<built-in function getattr></font>)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSInterpreter-pop"><strong>pop</strong></a>(self, *types)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSInterpreter-push"><strong>push</strong></a>(self, object)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSInterpreter-resolve_name"><strong>resolve_name</strong></a>(self, name)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSInterpreter-suckoperators"><strong>suckoperators</strong></a>(self, systemdict, klass)</dt></dl>
|
||||
|
||||
<hr>
|
||||
Methods inherited from <a href="fontTools.misc.psOperators.html#PSOperators">fontTools.misc.psOperators.PSOperators</a>:<br>
|
||||
<dl><dt><a name="PSInterpreter-proc_bind"><strong>proc_bind</strong></a>(self, proc)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSInterpreter-ps_anchorsearch"><strong>ps_anchorsearch</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSInterpreter-ps_array"><strong>ps_array</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSInterpreter-ps_astore"><strong>ps_astore</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSInterpreter-ps_begin"><strong>ps_begin</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSInterpreter-ps_bind"><strong>ps_bind</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSInterpreter-ps_cleartomark"><strong>ps_cleartomark</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSInterpreter-ps_closefile"><strong>ps_closefile</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSInterpreter-ps_count"><strong>ps_count</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSInterpreter-ps_currentdict"><strong>ps_currentdict</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSInterpreter-ps_currentfile"><strong>ps_currentfile</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSInterpreter-ps_cvn"><strong>ps_cvn</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSInterpreter-ps_cvx"><strong>ps_cvx</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSInterpreter-ps_def"><strong>ps_def</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSInterpreter-ps_definefont"><strong>ps_definefont</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSInterpreter-ps_dict"><strong>ps_dict</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSInterpreter-ps_dup"><strong>ps_dup</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSInterpreter-ps_eexec"><strong>ps_eexec</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSInterpreter-ps_end"><strong>ps_end</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSInterpreter-ps_eq"><strong>ps_eq</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSInterpreter-ps_exch"><strong>ps_exch</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSInterpreter-ps_exec"><strong>ps_exec</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSInterpreter-ps_executeonly"><strong>ps_executeonly</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSInterpreter-ps_findfont"><strong>ps_findfont</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSInterpreter-ps_for"><strong>ps_for</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSInterpreter-ps_forall"><strong>ps_forall</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSInterpreter-ps_get"><strong>ps_get</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSInterpreter-ps_getinterval"><strong>ps_getinterval</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSInterpreter-ps_if"><strong>ps_if</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSInterpreter-ps_ifelse"><strong>ps_ifelse</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSInterpreter-ps_index"><strong>ps_index</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSInterpreter-ps_known"><strong>ps_known</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSInterpreter-ps_load"><strong>ps_load</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSInterpreter-ps_matrix"><strong>ps_matrix</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSInterpreter-ps_ne"><strong>ps_ne</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSInterpreter-ps_noaccess"><strong>ps_noaccess</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSInterpreter-ps_not"><strong>ps_not</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSInterpreter-ps_pop"><strong>ps_pop</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSInterpreter-ps_print"><strong>ps_print</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSInterpreter-ps_put"><strong>ps_put</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSInterpreter-ps_putinterval"><strong>ps_putinterval</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSInterpreter-ps_readonly"><strong>ps_readonly</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSInterpreter-ps_readstring"><strong>ps_readstring</strong></a>(self, ps_boolean<font color="#909090">=<class fontTools.misc.psOperators.ps_boolean at 0x15be540></font>, len<font color="#909090">=<built-in function len></font>)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSInterpreter-ps_store"><strong>ps_store</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSInterpreter-ps_string"><strong>ps_string</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSInterpreter-ps_systemdict"><strong>ps_systemdict</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSInterpreter-ps_type"><strong>ps_type</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSInterpreter-ps_userdict"><strong>ps_userdict</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSInterpreter-ps_where"><strong>ps_where</strong></a>(self)</dt></dl>
|
||||
|
||||
</td></tr></table> <p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#ffc8d8">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#000000" face="helvetica, arial"><a name="PSTokenizer">class <strong>PSTokenizer</strong></a>(<a href="StringIO.html#StringIO">StringIO.StringIO</a>)</font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
|
||||
<td width="100%">Methods defined here:<br>
|
||||
<dl><dt><a name="PSTokenizer-flush"><strong>flush</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSTokenizer-getnexttoken"><strong>getnexttoken</strong></a>(self, len<font color="#909090">=<built-in function len></font>, ps_special<font color="#909090">='()<>[]{}%'</font>, stringmatch<font color="#909090">=<built-in method match of _sre.SRE_Pattern object at 0x14ac020></font>, hexstringmatch<font color="#909090">=<built-in method match of _sre.SRE_Pattern object at 0x162c6b0></font>, commentmatch<font color="#909090">=<built-in method match of _sre.SRE_Pattern object at 0x15b2440></font>, endmatch<font color="#909090">=<built-in method match of _sre.SRE_Pattern object at 0x15b2320></font>, whitematch<font color="#909090">=<built-in method match of _sre.SRE_Pattern object at 0x15bb020></font>)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSTokenizer-skipwhite"><strong>skipwhite</strong></a>(self, whitematch<font color="#909090">=<built-in method match of _sre.SRE_Pattern object at 0x15bb020></font>)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSTokenizer-starteexec"><strong>starteexec</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSTokenizer-stopeexec"><strong>stopeexec</strong></a>(self)</dt></dl>
|
||||
|
||||
<hr>
|
||||
Methods inherited from <a href="StringIO.html#StringIO">StringIO.StringIO</a>:<br>
|
||||
<dl><dt><a name="PSTokenizer-__init__"><strong>__init__</strong></a>(self, buf<font color="#909090">=''</font>)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSTokenizer-__iter__"><strong>__iter__</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSTokenizer-close"><strong>close</strong></a>(self)</dt><dd><tt>Free the memory buffer.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="PSTokenizer-getvalue"><strong>getvalue</strong></a>(self)</dt><dd><tt>Retrieve the entire contents of the "file" at any time before<br>
|
||||
the <a href="StringIO.html#StringIO">StringIO</a> object's <a href="#PSTokenizer-close">close</a>() method is called.<br>
|
||||
<br>
|
||||
The <a href="StringIO.html#StringIO">StringIO</a> object can accept either Unicode or 8-bit strings,<br>
|
||||
but mixing the two may take some care. If both are used, 8-bit<br>
|
||||
strings that cannot be interpreted as 7-bit ASCII (that use the<br>
|
||||
8th bit) will cause a UnicodeError to be raised when <a href="#PSTokenizer-getvalue">getvalue</a>()<br>
|
||||
is called.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="PSTokenizer-isatty"><strong>isatty</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSTokenizer-next"><strong>next</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSTokenizer-read"><strong>read</strong></a>(self, n<font color="#909090">=-1</font>)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSTokenizer-readline"><strong>readline</strong></a>(self, length<font color="#909090">=None</font>)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSTokenizer-readlines"><strong>readlines</strong></a>(self, sizehint<font color="#909090">=0</font>)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSTokenizer-seek"><strong>seek</strong></a>(self, pos, mode<font color="#909090">=0</font>)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSTokenizer-tell"><strong>tell</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSTokenizer-truncate"><strong>truncate</strong></a>(self, size<font color="#909090">=None</font>)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSTokenizer-write"><strong>write</strong></a>(self, s)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSTokenizer-writelines"><strong>writelines</strong></a>(self, list)</dt></dl>
|
||||
|
||||
</td></tr></table></td></tr></table><p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#eeaa77">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td>
|
||||
<td width="100%"><dl><dt><a name="-suckfont"><strong>suckfont</strong></a>(data)</dt></dl>
|
||||
<dl><dt><a name="-unpack_item"><strong>unpack_item</strong></a>(item)</dt></dl>
|
||||
</td></tr></table><p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#55aa55">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td>
|
||||
<td width="100%"><strong>StandardEncoding</strong> = ['.notdef', '.notdef', '.notdef', '.notdef', '.notdef', '.notdef', '.notdef', '.notdef', '.notdef', '.notdef', '.notdef', '.notdef', '.notdef', '.notdef', '.notdef', '.notdef', '.notdef', '.notdef', '.notdef', '.notdef', ...]<br>
|
||||
<strong>commentRE</strong> = <_sre.SRE_Pattern object at 0x15b2440><br>
|
||||
<strong>endofthingPat</strong> = '[^][(){}<>/%<font color="#c040c0">\t\n\x0b\x0c\r</font> ]*'<br>
|
||||
<strong>endofthingRE</strong> = <_sre.SRE_Pattern object at 0x15b2320><br>
|
||||
<strong>hexstringRE</strong> = <_sre.SRE_Pattern object at 0x162c6b0><br>
|
||||
<strong>notdef</strong> = '.notdef'<br>
|
||||
<strong>ps_StandardEncoding</strong> = [<name '.notdef'>, <name '.notdef'>, <name '.notdef'>, <name '.notdef'>, <name '.notdef'>, <name '.notdef'>, <name '.notdef'>, <name '.notdef'>, <name '.notdef'>, <name '.notdef'>, <name '.notdef'>, <name '.notdef'>, <name '.notdef'>, <name '.notdef'>, <name '.notdef'>, <name '.notdef'>, <name '.notdef'>, <name '.notdef'>, <name '.notdef'>, <name '.notdef'>, ...]<br>
|
||||
<strong>ps_error</strong> = 'ps_error'<br>
|
||||
<strong>ps_special</strong> = '()<>[]{}%'<br>
|
||||
<strong>ps_tokenerror</strong> = 'ps_tokenerror'<br>
|
||||
<strong>skipwhiteRE</strong> = <_sre.SRE_Pattern object at 0x15bb020><br>
|
||||
<strong>stringPat</strong> = r'\((([^()]*\[()])|([^()]*\([^()]*\)))*[^()]*\)'<br>
|
||||
<strong>stringRE</strong> = <_sre.SRE_Pattern object at 0x14ac020><br>
|
||||
<strong>whitespace</strong> = '<font color="#c040c0">\t\n\x0b\x0c\r</font> '</td></tr></table>
|
||||
</body></html>
|
531
Documentation/fontToolsDocs/fontTools.misc.psOperators.html
Normal file
531
Documentation/fontToolsDocs/fontTools.misc.psOperators.html
Normal file
@ -0,0 +1,531 @@
|
||||
|
||||
<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html><head><title>Python: module fontTools.misc.psOperators</title>
|
||||
</head><body bgcolor="#f0f0f8">
|
||||
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
|
||||
<tr bgcolor="#7799ee">
|
||||
<td valign=bottom> <br>
|
||||
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong><a href="fontTools.html"><font color="#ffffff">fontTools</font></a>.<a href="fontTools.misc.html"><font color="#ffffff">misc</font></a>.psOperators</strong></big></big></font></td
|
||||
><td align=right valign=bottom
|
||||
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/code/fontTools/Lib/fontTools/misc/psOperators.py">/code/fontTools/Lib/fontTools/misc/psOperators.py</a></font></td></tr></table>
|
||||
<p></p>
|
||||
<p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#ee77aa">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td>
|
||||
<td width="100%"><dl>
|
||||
<dt><font face="helvetica, arial"><a href="fontTools.misc.psOperators.html#PSOperators">PSOperators</a>
|
||||
</font></dt><dt><font face="helvetica, arial"><a href="fontTools.misc.psOperators.html#ps_object">ps_object</a>
|
||||
</font></dt><dd>
|
||||
<dl>
|
||||
<dt><font face="helvetica, arial"><a href="fontTools.misc.psOperators.html#ps_array">ps_array</a>
|
||||
</font></dt><dt><font face="helvetica, arial"><a href="fontTools.misc.psOperators.html#ps_boolean">ps_boolean</a>
|
||||
</font></dt><dt><font face="helvetica, arial"><a href="fontTools.misc.psOperators.html#ps_dict">ps_dict</a>
|
||||
</font></dt><dt><font face="helvetica, arial"><a href="fontTools.misc.psOperators.html#ps_file">ps_file</a>
|
||||
</font></dt><dt><font face="helvetica, arial"><a href="fontTools.misc.psOperators.html#ps_font">ps_font</a>
|
||||
</font></dt><dt><font face="helvetica, arial"><a href="fontTools.misc.psOperators.html#ps_integer">ps_integer</a>
|
||||
</font></dt><dt><font face="helvetica, arial"><a href="fontTools.misc.psOperators.html#ps_literal">ps_literal</a>
|
||||
</font></dt><dt><font face="helvetica, arial"><a href="fontTools.misc.psOperators.html#ps_mark">ps_mark</a>
|
||||
</font></dt><dt><font face="helvetica, arial"><a href="fontTools.misc.psOperators.html#ps_name">ps_name</a>
|
||||
</font></dt><dt><font face="helvetica, arial"><a href="fontTools.misc.psOperators.html#ps_null">ps_null</a>
|
||||
</font></dt><dt><font face="helvetica, arial"><a href="fontTools.misc.psOperators.html#ps_operator">ps_operator</a>
|
||||
</font></dt><dt><font face="helvetica, arial"><a href="fontTools.misc.psOperators.html#ps_procedure">ps_procedure</a>
|
||||
</font></dt><dt><font face="helvetica, arial"><a href="fontTools.misc.psOperators.html#ps_procmark">ps_procmark</a>
|
||||
</font></dt><dt><font face="helvetica, arial"><a href="fontTools.misc.psOperators.html#ps_real">ps_real</a>
|
||||
</font></dt><dt><font face="helvetica, arial"><a href="fontTools.misc.psOperators.html#ps_string">ps_string</a>
|
||||
</font></dt></dl>
|
||||
</dd>
|
||||
</dl>
|
||||
<p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#ffc8d8">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#000000" face="helvetica, arial"><a name="PSOperators">class <strong>PSOperators</strong></a></font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
|
||||
<td width="100%">Methods defined here:<br>
|
||||
<dl><dt><a name="PSOperators-proc_bind"><strong>proc_bind</strong></a>(self, proc)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSOperators-ps_anchorsearch"><strong>ps_anchorsearch</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSOperators-ps_array"><strong>ps_array</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSOperators-ps_astore"><strong>ps_astore</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSOperators-ps_begin"><strong>ps_begin</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSOperators-ps_bind"><strong>ps_bind</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSOperators-ps_cleartomark"><strong>ps_cleartomark</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSOperators-ps_closefile"><strong>ps_closefile</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSOperators-ps_count"><strong>ps_count</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSOperators-ps_currentdict"><strong>ps_currentdict</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSOperators-ps_currentfile"><strong>ps_currentfile</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSOperators-ps_cvn"><strong>ps_cvn</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSOperators-ps_cvx"><strong>ps_cvx</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSOperators-ps_def"><strong>ps_def</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSOperators-ps_definefont"><strong>ps_definefont</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSOperators-ps_dict"><strong>ps_dict</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSOperators-ps_dup"><strong>ps_dup</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSOperators-ps_eexec"><strong>ps_eexec</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSOperators-ps_end"><strong>ps_end</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSOperators-ps_eq"><strong>ps_eq</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSOperators-ps_exch"><strong>ps_exch</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSOperators-ps_exec"><strong>ps_exec</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSOperators-ps_executeonly"><strong>ps_executeonly</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSOperators-ps_findfont"><strong>ps_findfont</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSOperators-ps_for"><strong>ps_for</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSOperators-ps_forall"><strong>ps_forall</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSOperators-ps_get"><strong>ps_get</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSOperators-ps_getinterval"><strong>ps_getinterval</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSOperators-ps_if"><strong>ps_if</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSOperators-ps_ifelse"><strong>ps_ifelse</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSOperators-ps_index"><strong>ps_index</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSOperators-ps_known"><strong>ps_known</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSOperators-ps_load"><strong>ps_load</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSOperators-ps_matrix"><strong>ps_matrix</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSOperators-ps_ne"><strong>ps_ne</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSOperators-ps_noaccess"><strong>ps_noaccess</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSOperators-ps_not"><strong>ps_not</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSOperators-ps_pop"><strong>ps_pop</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSOperators-ps_print"><strong>ps_print</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSOperators-ps_put"><strong>ps_put</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSOperators-ps_putinterval"><strong>ps_putinterval</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSOperators-ps_readonly"><strong>ps_readonly</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSOperators-ps_readstring"><strong>ps_readstring</strong></a>(self, ps_boolean<font color="#909090">=<class fontTools.misc.psOperators.ps_boolean at 0x15be540></font>, len<font color="#909090">=<built-in function len></font>)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSOperators-ps_store"><strong>ps_store</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSOperators-ps_string"><strong>ps_string</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSOperators-ps_systemdict"><strong>ps_systemdict</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSOperators-ps_type"><strong>ps_type</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSOperators-ps_userdict"><strong>ps_userdict</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="PSOperators-ps_where"><strong>ps_where</strong></a>(self)</dt></dl>
|
||||
|
||||
</td></tr></table> <p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#ffc8d8">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#000000" face="helvetica, arial"><a name="ps_array">class <strong>ps_array</strong></a>(<a href="fontTools.misc.psOperators.html#ps_object">ps_object</a>)</font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
|
||||
<td width="100%">Methods defined here:<br>
|
||||
<dl><dt><a name="ps_array-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="ps_array-__str__"><strong>__str__</strong></a>(self)</dt></dl>
|
||||
|
||||
<hr>
|
||||
Methods inherited from <a href="fontTools.misc.psOperators.html#ps_object">ps_object</a>:<br>
|
||||
<dl><dt><a name="ps_array-__init__"><strong>__init__</strong></a>(self, value)</dt></dl>
|
||||
|
||||
<hr>
|
||||
Data and other attributes inherited from <a href="fontTools.misc.psOperators.html#ps_object">ps_object</a>:<br>
|
||||
<dl><dt><strong>access</strong> = 0</dl>
|
||||
|
||||
<dl><dt><strong>literal</strong> = 1</dl>
|
||||
|
||||
<dl><dt><strong>value</strong> = None</dl>
|
||||
|
||||
</td></tr></table> <p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#ffc8d8">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#000000" face="helvetica, arial"><a name="ps_boolean">class <strong>ps_boolean</strong></a>(<a href="fontTools.misc.psOperators.html#ps_object">ps_object</a>)</font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
|
||||
<td width="100%">Methods defined here:<br>
|
||||
<dl><dt><a name="ps_boolean-__str__"><strong>__str__</strong></a>(self)</dt></dl>
|
||||
|
||||
<hr>
|
||||
Methods inherited from <a href="fontTools.misc.psOperators.html#ps_object">ps_object</a>:<br>
|
||||
<dl><dt><a name="ps_boolean-__init__"><strong>__init__</strong></a>(self, value)</dt></dl>
|
||||
|
||||
<dl><dt><a name="ps_boolean-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
|
||||
|
||||
<hr>
|
||||
Data and other attributes inherited from <a href="fontTools.misc.psOperators.html#ps_object">ps_object</a>:<br>
|
||||
<dl><dt><strong>access</strong> = 0</dl>
|
||||
|
||||
<dl><dt><strong>literal</strong> = 1</dl>
|
||||
|
||||
<dl><dt><strong>value</strong> = None</dl>
|
||||
|
||||
</td></tr></table> <p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#ffc8d8">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#000000" face="helvetica, arial"><a name="ps_dict">class <strong>ps_dict</strong></a>(<a href="fontTools.misc.psOperators.html#ps_object">ps_object</a>)</font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
|
||||
<td width="100%">Methods defined here:<br>
|
||||
<dl><dt><a name="ps_dict-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="ps_dict-__str__"><strong>__str__</strong></a>(self)</dt></dl>
|
||||
|
||||
<hr>
|
||||
Methods inherited from <a href="fontTools.misc.psOperators.html#ps_object">ps_object</a>:<br>
|
||||
<dl><dt><a name="ps_dict-__init__"><strong>__init__</strong></a>(self, value)</dt></dl>
|
||||
|
||||
<hr>
|
||||
Data and other attributes inherited from <a href="fontTools.misc.psOperators.html#ps_object">ps_object</a>:<br>
|
||||
<dl><dt><strong>access</strong> = 0</dl>
|
||||
|
||||
<dl><dt><strong>literal</strong> = 1</dl>
|
||||
|
||||
<dl><dt><strong>value</strong> = None</dl>
|
||||
|
||||
</td></tr></table> <p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#ffc8d8">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#000000" face="helvetica, arial"><a name="ps_file">class <strong>ps_file</strong></a>(<a href="fontTools.misc.psOperators.html#ps_object">ps_object</a>)</font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
|
||||
<td width="100%">Methods inherited from <a href="fontTools.misc.psOperators.html#ps_object">ps_object</a>:<br>
|
||||
<dl><dt><a name="ps_file-__init__"><strong>__init__</strong></a>(self, value)</dt></dl>
|
||||
|
||||
<dl><dt><a name="ps_file-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
|
||||
|
||||
<hr>
|
||||
Data and other attributes inherited from <a href="fontTools.misc.psOperators.html#ps_object">ps_object</a>:<br>
|
||||
<dl><dt><strong>access</strong> = 0</dl>
|
||||
|
||||
<dl><dt><strong>literal</strong> = 1</dl>
|
||||
|
||||
<dl><dt><strong>value</strong> = None</dl>
|
||||
|
||||
</td></tr></table> <p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#ffc8d8">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#000000" face="helvetica, arial"><a name="ps_font">class <strong>ps_font</strong></a>(<a href="fontTools.misc.psOperators.html#ps_object">ps_object</a>)</font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
|
||||
<td width="100%">Methods defined here:<br>
|
||||
<dl><dt><a name="ps_font-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="ps_font-__str__"><strong>__str__</strong></a>(self)</dt></dl>
|
||||
|
||||
<hr>
|
||||
Methods inherited from <a href="fontTools.misc.psOperators.html#ps_object">ps_object</a>:<br>
|
||||
<dl><dt><a name="ps_font-__init__"><strong>__init__</strong></a>(self, value)</dt></dl>
|
||||
|
||||
<hr>
|
||||
Data and other attributes inherited from <a href="fontTools.misc.psOperators.html#ps_object">ps_object</a>:<br>
|
||||
<dl><dt><strong>access</strong> = 0</dl>
|
||||
|
||||
<dl><dt><strong>literal</strong> = 1</dl>
|
||||
|
||||
<dl><dt><strong>value</strong> = None</dl>
|
||||
|
||||
</td></tr></table> <p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#ffc8d8">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#000000" face="helvetica, arial"><a name="ps_integer">class <strong>ps_integer</strong></a>(<a href="fontTools.misc.psOperators.html#ps_object">ps_object</a>)</font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
|
||||
<td width="100%">Methods defined here:<br>
|
||||
<dl><dt><a name="ps_integer-__str__"><strong>__str__</strong></a>(self)</dt></dl>
|
||||
|
||||
<hr>
|
||||
Methods inherited from <a href="fontTools.misc.psOperators.html#ps_object">ps_object</a>:<br>
|
||||
<dl><dt><a name="ps_integer-__init__"><strong>__init__</strong></a>(self, value)</dt></dl>
|
||||
|
||||
<dl><dt><a name="ps_integer-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
|
||||
|
||||
<hr>
|
||||
Data and other attributes inherited from <a href="fontTools.misc.psOperators.html#ps_object">ps_object</a>:<br>
|
||||
<dl><dt><strong>access</strong> = 0</dl>
|
||||
|
||||
<dl><dt><strong>literal</strong> = 1</dl>
|
||||
|
||||
<dl><dt><strong>value</strong> = None</dl>
|
||||
|
||||
</td></tr></table> <p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#ffc8d8">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#000000" face="helvetica, arial"><a name="ps_literal">class <strong>ps_literal</strong></a>(<a href="fontTools.misc.psOperators.html#ps_object">ps_object</a>)</font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
|
||||
<td width="100%">Methods defined here:<br>
|
||||
<dl><dt><a name="ps_literal-__str__"><strong>__str__</strong></a>(self)</dt></dl>
|
||||
|
||||
<hr>
|
||||
Methods inherited from <a href="fontTools.misc.psOperators.html#ps_object">ps_object</a>:<br>
|
||||
<dl><dt><a name="ps_literal-__init__"><strong>__init__</strong></a>(self, value)</dt></dl>
|
||||
|
||||
<dl><dt><a name="ps_literal-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
|
||||
|
||||
<hr>
|
||||
Data and other attributes inherited from <a href="fontTools.misc.psOperators.html#ps_object">ps_object</a>:<br>
|
||||
<dl><dt><strong>access</strong> = 0</dl>
|
||||
|
||||
<dl><dt><strong>literal</strong> = 1</dl>
|
||||
|
||||
<dl><dt><strong>value</strong> = None</dl>
|
||||
|
||||
</td></tr></table> <p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#ffc8d8">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#000000" face="helvetica, arial"><a name="ps_mark">class <strong>ps_mark</strong></a>(<a href="fontTools.misc.psOperators.html#ps_object">ps_object</a>)</font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
|
||||
<td width="100%">Methods defined here:<br>
|
||||
<dl><dt><a name="ps_mark-__init__"><strong>__init__</strong></a>(self)</dt></dl>
|
||||
|
||||
<hr>
|
||||
Methods inherited from <a href="fontTools.misc.psOperators.html#ps_object">ps_object</a>:<br>
|
||||
<dl><dt><a name="ps_mark-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
|
||||
|
||||
<hr>
|
||||
Data and other attributes inherited from <a href="fontTools.misc.psOperators.html#ps_object">ps_object</a>:<br>
|
||||
<dl><dt><strong>access</strong> = 0</dl>
|
||||
|
||||
<dl><dt><strong>literal</strong> = 1</dl>
|
||||
|
||||
<dl><dt><strong>value</strong> = None</dl>
|
||||
|
||||
</td></tr></table> <p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#ffc8d8">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#000000" face="helvetica, arial"><a name="ps_name">class <strong>ps_name</strong></a>(<a href="fontTools.misc.psOperators.html#ps_object">ps_object</a>)</font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
|
||||
<td width="100%">Methods defined here:<br>
|
||||
<dl><dt><a name="ps_name-__str__"><strong>__str__</strong></a>(self)</dt></dl>
|
||||
|
||||
<hr>
|
||||
Data and other attributes defined here:<br>
|
||||
<dl><dt><strong>literal</strong> = 0</dl>
|
||||
|
||||
<hr>
|
||||
Methods inherited from <a href="fontTools.misc.psOperators.html#ps_object">ps_object</a>:<br>
|
||||
<dl><dt><a name="ps_name-__init__"><strong>__init__</strong></a>(self, value)</dt></dl>
|
||||
|
||||
<dl><dt><a name="ps_name-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
|
||||
|
||||
<hr>
|
||||
Data and other attributes inherited from <a href="fontTools.misc.psOperators.html#ps_object">ps_object</a>:<br>
|
||||
<dl><dt><strong>access</strong> = 0</dl>
|
||||
|
||||
<dl><dt><strong>value</strong> = None</dl>
|
||||
|
||||
</td></tr></table> <p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#ffc8d8">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#000000" face="helvetica, arial"><a name="ps_null">class <strong>ps_null</strong></a>(<a href="fontTools.misc.psOperators.html#ps_object">ps_object</a>)</font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
|
||||
<td width="100%">Methods defined here:<br>
|
||||
<dl><dt><a name="ps_null-__init__"><strong>__init__</strong></a>(self)</dt></dl>
|
||||
|
||||
<hr>
|
||||
Methods inherited from <a href="fontTools.misc.psOperators.html#ps_object">ps_object</a>:<br>
|
||||
<dl><dt><a name="ps_null-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
|
||||
|
||||
<hr>
|
||||
Data and other attributes inherited from <a href="fontTools.misc.psOperators.html#ps_object">ps_object</a>:<br>
|
||||
<dl><dt><strong>access</strong> = 0</dl>
|
||||
|
||||
<dl><dt><strong>literal</strong> = 1</dl>
|
||||
|
||||
<dl><dt><strong>value</strong> = None</dl>
|
||||
|
||||
</td></tr></table> <p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#ffc8d8">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#000000" face="helvetica, arial"><a name="ps_object">class <strong>ps_object</strong></a></font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
|
||||
<td width="100%">Methods defined here:<br>
|
||||
<dl><dt><a name="ps_object-__init__"><strong>__init__</strong></a>(self, value)</dt></dl>
|
||||
|
||||
<dl><dt><a name="ps_object-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
|
||||
|
||||
<hr>
|
||||
Data and other attributes defined here:<br>
|
||||
<dl><dt><strong>access</strong> = 0</dl>
|
||||
|
||||
<dl><dt><strong>literal</strong> = 1</dl>
|
||||
|
||||
<dl><dt><strong>value</strong> = None</dl>
|
||||
|
||||
</td></tr></table> <p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#ffc8d8">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#000000" face="helvetica, arial"><a name="ps_operator">class <strong>ps_operator</strong></a>(<a href="fontTools.misc.psOperators.html#ps_object">ps_object</a>)</font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
|
||||
<td width="100%">Methods defined here:<br>
|
||||
<dl><dt><a name="ps_operator-__init__"><strong>__init__</strong></a>(self, name, function)</dt></dl>
|
||||
|
||||
<dl><dt><a name="ps_operator-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
|
||||
|
||||
<hr>
|
||||
Data and other attributes defined here:<br>
|
||||
<dl><dt><strong>literal</strong> = 0</dl>
|
||||
|
||||
<hr>
|
||||
Data and other attributes inherited from <a href="fontTools.misc.psOperators.html#ps_object">ps_object</a>:<br>
|
||||
<dl><dt><strong>access</strong> = 0</dl>
|
||||
|
||||
<dl><dt><strong>value</strong> = None</dl>
|
||||
|
||||
</td></tr></table> <p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#ffc8d8">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#000000" face="helvetica, arial"><a name="ps_procedure">class <strong>ps_procedure</strong></a>(<a href="fontTools.misc.psOperators.html#ps_object">ps_object</a>)</font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
|
||||
<td width="100%">Methods defined here:<br>
|
||||
<dl><dt><a name="ps_procedure-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="ps_procedure-__str__"><strong>__str__</strong></a>(self)</dt></dl>
|
||||
|
||||
<hr>
|
||||
Data and other attributes defined here:<br>
|
||||
<dl><dt><strong>literal</strong> = 0</dl>
|
||||
|
||||
<hr>
|
||||
Methods inherited from <a href="fontTools.misc.psOperators.html#ps_object">ps_object</a>:<br>
|
||||
<dl><dt><a name="ps_procedure-__init__"><strong>__init__</strong></a>(self, value)</dt></dl>
|
||||
|
||||
<hr>
|
||||
Data and other attributes inherited from <a href="fontTools.misc.psOperators.html#ps_object">ps_object</a>:<br>
|
||||
<dl><dt><strong>access</strong> = 0</dl>
|
||||
|
||||
<dl><dt><strong>value</strong> = None</dl>
|
||||
|
||||
</td></tr></table> <p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#ffc8d8">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#000000" face="helvetica, arial"><a name="ps_procmark">class <strong>ps_procmark</strong></a>(<a href="fontTools.misc.psOperators.html#ps_object">ps_object</a>)</font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
|
||||
<td width="100%">Methods defined here:<br>
|
||||
<dl><dt><a name="ps_procmark-__init__"><strong>__init__</strong></a>(self)</dt></dl>
|
||||
|
||||
<hr>
|
||||
Methods inherited from <a href="fontTools.misc.psOperators.html#ps_object">ps_object</a>:<br>
|
||||
<dl><dt><a name="ps_procmark-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
|
||||
|
||||
<hr>
|
||||
Data and other attributes inherited from <a href="fontTools.misc.psOperators.html#ps_object">ps_object</a>:<br>
|
||||
<dl><dt><strong>access</strong> = 0</dl>
|
||||
|
||||
<dl><dt><strong>literal</strong> = 1</dl>
|
||||
|
||||
<dl><dt><strong>value</strong> = None</dl>
|
||||
|
||||
</td></tr></table> <p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#ffc8d8">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#000000" face="helvetica, arial"><a name="ps_real">class <strong>ps_real</strong></a>(<a href="fontTools.misc.psOperators.html#ps_object">ps_object</a>)</font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
|
||||
<td width="100%">Methods defined here:<br>
|
||||
<dl><dt><a name="ps_real-__str__"><strong>__str__</strong></a>(self)</dt></dl>
|
||||
|
||||
<hr>
|
||||
Methods inherited from <a href="fontTools.misc.psOperators.html#ps_object">ps_object</a>:<br>
|
||||
<dl><dt><a name="ps_real-__init__"><strong>__init__</strong></a>(self, value)</dt></dl>
|
||||
|
||||
<dl><dt><a name="ps_real-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
|
||||
|
||||
<hr>
|
||||
Data and other attributes inherited from <a href="fontTools.misc.psOperators.html#ps_object">ps_object</a>:<br>
|
||||
<dl><dt><strong>access</strong> = 0</dl>
|
||||
|
||||
<dl><dt><strong>literal</strong> = 1</dl>
|
||||
|
||||
<dl><dt><strong>value</strong> = None</dl>
|
||||
|
||||
</td></tr></table> <p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#ffc8d8">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#000000" face="helvetica, arial"><a name="ps_string">class <strong>ps_string</strong></a>(<a href="fontTools.misc.psOperators.html#ps_object">ps_object</a>)</font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
|
||||
<td width="100%">Methods defined here:<br>
|
||||
<dl><dt><a name="ps_string-__str__"><strong>__str__</strong></a>(self)</dt></dl>
|
||||
|
||||
<hr>
|
||||
Methods inherited from <a href="fontTools.misc.psOperators.html#ps_object">ps_object</a>:<br>
|
||||
<dl><dt><a name="ps_string-__init__"><strong>__init__</strong></a>(self, value)</dt></dl>
|
||||
|
||||
<dl><dt><a name="ps_string-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
|
||||
|
||||
<hr>
|
||||
Data and other attributes inherited from <a href="fontTools.misc.psOperators.html#ps_object">ps_object</a>:<br>
|
||||
<dl><dt><strong>access</strong> = 0</dl>
|
||||
|
||||
<dl><dt><strong>literal</strong> = 1</dl>
|
||||
|
||||
<dl><dt><strong>value</strong> = None</dl>
|
||||
|
||||
</td></tr></table></td></tr></table><p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#55aa55">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td>
|
||||
<td width="100%"><strong>StandardEncoding</strong> = ['.notdef', '.notdef', '.notdef', '.notdef', '.notdef', '.notdef', '.notdef', '.notdef', '.notdef', '.notdef', '.notdef', '.notdef', '.notdef', '.notdef', '.notdef', '.notdef', '.notdef', '.notdef', '.notdef', '.notdef', ...]<br>
|
||||
<strong>notdef</strong> = '.notdef'<br>
|
||||
<strong>ps_StandardEncoding</strong> = [<name '.notdef'>, <name '.notdef'>, <name '.notdef'>, <name '.notdef'>, <name '.notdef'>, <name '.notdef'>, <name '.notdef'>, <name '.notdef'>, <name '.notdef'>, <name '.notdef'>, <name '.notdef'>, <name '.notdef'>, <name '.notdef'>, <name '.notdef'>, <name '.notdef'>, <name '.notdef'>, <name '.notdef'>, <name '.notdef'>, <name '.notdef'>, <name '.notdef'>, ...]</td></tr></table>
|
||||
</body></html>
|
37
Documentation/fontToolsDocs/fontTools.misc.textTools.html
Normal file
37
Documentation/fontToolsDocs/fontTools.misc.textTools.html
Normal file
@ -0,0 +1,37 @@
|
||||
|
||||
<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html><head><title>Python: module fontTools.misc.textTools</title>
|
||||
</head><body bgcolor="#f0f0f8">
|
||||
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
|
||||
<tr bgcolor="#7799ee">
|
||||
<td valign=bottom> <br>
|
||||
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong><a href="fontTools.html"><font color="#ffffff">fontTools</font></a>.<a href="fontTools.misc.html"><font color="#ffffff">misc</font></a>.textTools</strong></big></big></font></td
|
||||
><td align=right valign=bottom
|
||||
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/code/fontTools/Lib/fontTools/misc/textTools.py">/code/fontTools/Lib/fontTools/misc/textTools.py</a></font></td></tr></table>
|
||||
<p><tt>fontTools.misc.textTools.py -- miscelaneous routines.</tt></p>
|
||||
<p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#aa55cc">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td>
|
||||
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="string.html">string</a><br>
|
||||
</td><td width="25%" valign=top></td><td width="25%" valign=top></td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#eeaa77">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td>
|
||||
<td width="100%"><dl><dt><a name="-binary2num"><strong>binary2num</strong></a>(bin)</dt></dl>
|
||||
<dl><dt><a name="-caselessSort"><strong>caselessSort</strong></a>(alist)</dt><dd><tt>Return a sorted copy of a list. If there are only strings <br>
|
||||
in the list, it will not consider case.</tt></dd></dl>
|
||||
<dl><dt><a name="-deHexStr"><strong>deHexStr</strong></a>(hexdata)</dt><dd><tt>Convert a hex string to binary data.</tt></dd></dl>
|
||||
<dl><dt><a name="-hexStr"><strong>hexStr</strong></a>(data)</dt><dd><tt>Convert binary data to a hex string.</tt></dd></dl>
|
||||
<dl><dt><a name="-num2binary"><strong>num2binary</strong></a>(l, bits<font color="#909090">=32</font>)</dt></dl>
|
||||
<dl><dt><a name="-readHex"><strong>readHex</strong></a>(content)</dt><dd><tt>Convert a list of hex strings to binary data.</tt></dd></dl>
|
||||
<dl><dt><a name="-safeEval"><strong>safeEval</strong></a>(data, eval<font color="#909090">=<built-in function eval></font>)</dt><dd><tt>A safe replacement for eval.</tt></dd></dl>
|
||||
</td></tr></table>
|
||||
</body></html>
|
285
Documentation/fontToolsDocs/fontTools.misc.transform.html
Normal file
285
Documentation/fontToolsDocs/fontTools.misc.transform.html
Normal file
@ -0,0 +1,285 @@
|
||||
|
||||
<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html><head><title>Python: module fontTools.misc.transform</title>
|
||||
</head><body bgcolor="#f0f0f8">
|
||||
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
|
||||
<tr bgcolor="#7799ee">
|
||||
<td valign=bottom> <br>
|
||||
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong><a href="fontTools.html"><font color="#ffffff">fontTools</font></a>.<a href="fontTools.misc.html"><font color="#ffffff">misc</font></a>.transform</strong></big></big></font></td
|
||||
><td align=right valign=bottom
|
||||
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/code/fontTools/Lib/fontTools/misc/transform.py">/code/fontTools/Lib/fontTools/misc/transform.py</a></font></td></tr></table>
|
||||
<p><tt>Affine 2D transformation matrix class.<br>
|
||||
<br>
|
||||
The <a href="#Transform">Transform</a> class implements various transformation matrix operations,<br>
|
||||
both on the matrix itself, as well as on 2D coordinates.<br>
|
||||
<br>
|
||||
<a href="#Transform">Transform</a> instances are effectively immutable: all methods that operate on the<br>
|
||||
transformation itself always return a new instance. This has as the<br>
|
||||
interesting side effect that <a href="#Transform">Transform</a> instances are hashable, ie. they can be<br>
|
||||
used as dictionary keys.<br>
|
||||
<br>
|
||||
This module exports the following symbols:<br>
|
||||
<br>
|
||||
<a href="#Transform">Transform</a> -- this is the main class<br>
|
||||
Identity -- <a href="#Transform">Transform</a> instance set to the identity transformation<br>
|
||||
Offset -- Convenience function that returns a translating transformation<br>
|
||||
Scale -- Convenience function that returns a scaling transformation<br>
|
||||
<br>
|
||||
Examples:<br>
|
||||
<br>
|
||||
>>> t = <a href="#Transform">Transform</a>(2, 0, 0, 3, 0, 0)<br>
|
||||
>>> t.transformPoint((100, 100))<br>
|
||||
(200, 300)<br>
|
||||
>>> t = <a href="#-Scale">Scale</a>(2, 3)<br>
|
||||
>>> t.transformPoint((100, 100))<br>
|
||||
(200, 300)<br>
|
||||
>>> t.transformPoint((0, 0))<br>
|
||||
(0, 0)<br>
|
||||
>>> t = <a href="#-Offset">Offset</a>(2, 3)<br>
|
||||
>>> t.transformPoint((100, 100))<br>
|
||||
(102, 103)<br>
|
||||
>>> t.transformPoint((0, 0))<br>
|
||||
(2, 3)<br>
|
||||
>>> t2 = t.scale(0.5)<br>
|
||||
>>> t2.transformPoint((100, 100))<br>
|
||||
(52.0, 53.0)<br>
|
||||
>>> import math<br>
|
||||
>>> t3 = t2.rotate(math.pi / 2)<br>
|
||||
>>> t3.transformPoint((0, 0))<br>
|
||||
(2.0, 3.0)<br>
|
||||
>>> t3.transformPoint((100, 100))<br>
|
||||
(-48.0, 53.0)<br>
|
||||
>>> t = Identity.scale(0.5).translate(100, 200).skew(0.1, 0.2)<br>
|
||||
>>> t.transformPoints([(0, 0), (1, 1), (100, 100)])<br>
|
||||
[(50.0, 100.0), (50.550167336042726, 100.60135501775433), (105.01673360427253, 160.13550177543362)]<br>
|
||||
>>></tt></p>
|
||||
<p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#ee77aa">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td>
|
||||
<td width="100%"><dl>
|
||||
<dt><font face="helvetica, arial"><a href="fontTools.misc.transform.html#Transform">Transform</a>
|
||||
</font></dt></dl>
|
||||
<p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#ffc8d8">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#000000" face="helvetica, arial"><a name="Transform">class <strong>Transform</strong></a></font></td></tr>
|
||||
|
||||
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
||||
<td colspan=2><tt>2x2 transformation matrix plus offset, a.k.a. Affine transform.<br>
|
||||
<a href="#Transform">Transform</a> instances are immutable: all transforming methods, eg.<br>
|
||||
<a href="#Transform-rotate">rotate</a>(), return a new <a href="#Transform">Transform</a> instance.<br>
|
||||
<br>
|
||||
Examples:<br>
|
||||
>>> t = <a href="#Transform">Transform</a>()<br>
|
||||
>>> t<br>
|
||||
<<a href="#Transform">Transform</a> [1 0 0 1 0 0]><br>
|
||||
>>> t.<a href="#Transform-scale">scale</a>(2)<br>
|
||||
<<a href="#Transform">Transform</a> [2 0 0 2 0 0]><br>
|
||||
>>> t.<a href="#Transform-scale">scale</a>(2.5, 5.5)<br>
|
||||
<<a href="#Transform">Transform</a> [2.5 0.0 0.0 5.5 0 0]><br>
|
||||
>>><br>
|
||||
>>> t.<a href="#Transform-scale">scale</a>(2, 3).<a href="#Transform-transformPoint">transformPoint</a>((100, 100))<br>
|
||||
(200, 300)<br> </tt></td></tr>
|
||||
<tr><td> </td>
|
||||
<td width="100%">Methods defined here:<br>
|
||||
<dl><dt><a name="Transform-__cmp__"><strong>__cmp__</strong></a>(self, other)</dt><dd><tt><a href="#Transform">Transform</a> instances are comparable:<br>
|
||||
>>> t1 = Identity.<a href="#Transform-scale">scale</a>(2, 3).<a href="#Transform-translate">translate</a>(4, 6)<br>
|
||||
>>> t2 = Identity.<a href="#Transform-translate">translate</a>(8, 18).<a href="#Transform-scale">scale</a>(2, 3)<br>
|
||||
>>> t1 == t2<br>
|
||||
1<br>
|
||||
>>><br>
|
||||
<br>
|
||||
But beware of floating point rounding errors:<br>
|
||||
>>> t1 = Identity.<a href="#Transform-scale">scale</a>(0.2, 0.3).<a href="#Transform-translate">translate</a>(0.4, 0.6)<br>
|
||||
>>> t2 = Identity.<a href="#Transform-translate">translate</a>(0.08, 0.18).<a href="#Transform-scale">scale</a>(0.2, 0.3)<br>
|
||||
>>> t1<br>
|
||||
<<a href="#Transform">Transform</a> [0.2 0.0 0.0 0.3 0.08 0.18]><br>
|
||||
>>> t2<br>
|
||||
<<a href="#Transform">Transform</a> [0.2 0.0 0.0 0.3 0.08 0.18]><br>
|
||||
>>> t1 == t2<br>
|
||||
0<br>
|
||||
>>></tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="Transform-__getitem__"><strong>__getitem__</strong></a>(self, index)</dt><dd><tt><a href="#Transform">Transform</a> instances also behave like sequences of length 6:<br>
|
||||
>>> list(Identity)<br>
|
||||
[1, 0, 0, 1, 0, 0]<br>
|
||||
>>> tuple(Identity)<br>
|
||||
(1, 0, 0, 1, 0, 0)<br>
|
||||
>>></tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="Transform-__getslice__"><strong>__getslice__</strong></a>(self, i, j)</dt><dd><tt><a href="#Transform">Transform</a> instances also behave like sequences and even support<br>
|
||||
slicing:<br>
|
||||
>>> t = <a href="#-Offset">Offset</a>(100, 200)<br>
|
||||
>>> t<br>
|
||||
<<a href="#Transform">Transform</a> [1 0 0 1 100 200]><br>
|
||||
>>> t[4:]<br>
|
||||
(100, 200)<br>
|
||||
>>></tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="Transform-__hash__"><strong>__hash__</strong></a>(self)</dt><dd><tt><a href="#Transform">Transform</a> instances are hashable, meaning you can use them as<br>
|
||||
keys in dictionaries:<br>
|
||||
>>> d = {<a href="#-Scale">Scale</a>(12, 13): None}<br>
|
||||
>>> d<br>
|
||||
{<<a href="#Transform">Transform</a> [12 0 0 13 0 0]>: None}<br>
|
||||
>>><br>
|
||||
<br>
|
||||
But again, beware of floating point rounding errors:<br>
|
||||
>>> t1 = Identity.<a href="#Transform-scale">scale</a>(0.2, 0.3).<a href="#Transform-translate">translate</a>(0.4, 0.6)<br>
|
||||
>>> t2 = Identity.<a href="#Transform-translate">translate</a>(0.08, 0.18).<a href="#Transform-scale">scale</a>(0.2, 0.3)<br>
|
||||
>>> t1<br>
|
||||
<<a href="#Transform">Transform</a> [0.2 0.0 0.0 0.3 0.08 0.18]><br>
|
||||
>>> t2<br>
|
||||
<<a href="#Transform">Transform</a> [0.2 0.0 0.0 0.3 0.08 0.18]><br>
|
||||
>>> d = {t1: None}<br>
|
||||
>>> d<br>
|
||||
{<<a href="#Transform">Transform</a> [0.2 0.0 0.0 0.3 0.08 0.18]>: None}<br>
|
||||
>>> d[t2]<br>
|
||||
Traceback (most recent call last):<br>
|
||||
File "<stdin>", line 1, in ?<br>
|
||||
KeyError: <<a href="#Transform">Transform</a> [0.2 0.0 0.0 0.3 0.08 0.18]><br>
|
||||
>>></tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="Transform-__init__"><strong>__init__</strong></a>(self, xx<font color="#909090">=1</font>, xy<font color="#909090">=0</font>, yx<font color="#909090">=0</font>, yy<font color="#909090">=1</font>, dx<font color="#909090">=0</font>, dy<font color="#909090">=0</font>)</dt><dd><tt><a href="#Transform">Transform</a>'s constructor takes six arguments, all of which are<br>
|
||||
optional, and can be used as keyword arguments:<br>
|
||||
>>> <a href="#Transform">Transform</a>(12)<br>
|
||||
<<a href="#Transform">Transform</a> [12 0 0 1 0 0]><br>
|
||||
>>> <a href="#Transform">Transform</a>(dx=12)<br>
|
||||
<<a href="#Transform">Transform</a> [1 0 0 1 12 0]><br>
|
||||
>>> <a href="#Transform">Transform</a>(yx=12)<br>
|
||||
<<a href="#Transform">Transform</a> [1 0 12 1 0 0]><br>
|
||||
>>></tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="Transform-__len__"><strong>__len__</strong></a>(self)</dt><dd><tt><a href="#Transform">Transform</a> instances also behave like sequences of length 6:<br>
|
||||
>>> len(Identity)<br>
|
||||
6<br>
|
||||
>>></tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="Transform-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="Transform-inverse"><strong>inverse</strong></a>(self)</dt><dd><tt>Return the inverse transformation.<br>
|
||||
<br>
|
||||
Example:<br>
|
||||
>>> t = Identity.<a href="#Transform-translate">translate</a>(2, 3).<a href="#Transform-scale">scale</a>(4, 5)<br>
|
||||
>>> t.<a href="#Transform-transformPoint">transformPoint</a>((10, 20))<br>
|
||||
(42, 103)<br>
|
||||
>>> it = t.<a href="#Transform-inverse">inverse</a>()<br>
|
||||
>>> it.<a href="#Transform-transformPoint">transformPoint</a>((42, 103))<br>
|
||||
(10.0, 20.0)<br>
|
||||
>>></tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="Transform-reverseTransform"><strong>reverseTransform</strong></a>(self, other)</dt><dd><tt>Return a new transformation, which is the other transformation<br>
|
||||
transformed by self. <a href="#Transform-reverseTransform">reverseTransform</a>(other) is equivalent to<br>
|
||||
other.<a href="#Transform-transform">transform</a>(self).<br>
|
||||
<br>
|
||||
Example:<br>
|
||||
>>> t = <a href="#Transform">Transform</a>(2, 0, 0, 3, 1, 6)<br>
|
||||
>>> t.<a href="#Transform-reverseTransform">reverseTransform</a>((4, 3, 2, 1, 5, 6))<br>
|
||||
<<a href="#Transform">Transform</a> [8 6 6 3 21 15]><br>
|
||||
>>> <a href="#Transform">Transform</a>(4, 3, 2, 1, 5, 6).<a href="#Transform-transform">transform</a>((2, 0, 0, 3, 1, 6))<br>
|
||||
<<a href="#Transform">Transform</a> [8 6 6 3 21 15]><br>
|
||||
>>></tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="Transform-rotate"><strong>rotate</strong></a>(self, angle)</dt><dd><tt>Return a new transformation, rotated by 'angle' (radians).<br>
|
||||
<br>
|
||||
Example:<br>
|
||||
>>> import math<br>
|
||||
>>> t = <a href="#Transform">Transform</a>()<br>
|
||||
>>> t.<a href="#Transform-rotate">rotate</a>(math.pi / 2)<br>
|
||||
<<a href="#Transform">Transform</a> [0 1 -1 0 0 0]><br>
|
||||
>>></tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="Transform-scale"><strong>scale</strong></a>(self, x<font color="#909090">=1</font>, y<font color="#909090">=None</font>)</dt><dd><tt>Return a new transformation, scaled by x, y. The 'y' argument<br>
|
||||
may be None, which implies to use the x value for y as well.<br>
|
||||
<br>
|
||||
Example:<br>
|
||||
>>> t = <a href="#Transform">Transform</a>()<br>
|
||||
>>> t.<a href="#Transform-scale">scale</a>(5)<br>
|
||||
<<a href="#Transform">Transform</a> [5 0 0 5 0 0]><br>
|
||||
>>> t.<a href="#Transform-scale">scale</a>(5, 6)<br>
|
||||
<<a href="#Transform">Transform</a> [5 0 0 6 0 0]><br>
|
||||
>>></tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="Transform-skew"><strong>skew</strong></a>(self, x<font color="#909090">=0</font>, y<font color="#909090">=0</font>)</dt><dd><tt>Return a new transformation, skewed by x and y.<br>
|
||||
<br>
|
||||
Example:<br>
|
||||
>>> import math<br>
|
||||
>>> t = <a href="#Transform">Transform</a>()<br>
|
||||
>>> t.<a href="#Transform-skew">skew</a>(math.pi / 4)<br>
|
||||
<<a href="#Transform">Transform</a> [1.0 0.0 1.0 1.0 0 0]><br>
|
||||
>>></tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="Transform-toPS"><strong>toPS</strong></a>(self)</dt><dd><tt>Return a PostScript representation:<br>
|
||||
>>> t = Identity.<a href="#Transform-scale">scale</a>(2, 3).<a href="#Transform-translate">translate</a>(4, 5)<br>
|
||||
>>> t.<a href="#Transform-toPS">toPS</a>()<br>
|
||||
'[2 0 0 3 8 15]'<br>
|
||||
>>></tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="Transform-transform"><strong>transform</strong></a>(self, other)</dt><dd><tt>Return a new transformation, transformed by another<br>
|
||||
transformation.<br>
|
||||
<br>
|
||||
Example:<br>
|
||||
>>> t = <a href="#Transform">Transform</a>(2, 0, 0, 3, 1, 6)<br>
|
||||
>>> t.<a href="#Transform-transform">transform</a>((4, 3, 2, 1, 5, 6))<br>
|
||||
<<a href="#Transform">Transform</a> [8 9 4 3 11 24]><br>
|
||||
>>></tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="Transform-transformPoint"><strong>transformPoint</strong></a>(self, (x, y))</dt><dd><tt><a href="#Transform">Transform</a> a point.<br>
|
||||
<br>
|
||||
Example:<br>
|
||||
>>> t = <a href="#Transform">Transform</a>()<br>
|
||||
>>> t = t.<a href="#Transform-scale">scale</a>(2.5, 5.5)<br>
|
||||
>>> t.<a href="#Transform-transformPoint">transformPoint</a>((100, 100))<br>
|
||||
(250.0, 550.0)</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="Transform-transformPoints"><strong>transformPoints</strong></a>(self, points)</dt><dd><tt><a href="#Transform">Transform</a> a list of points.<br>
|
||||
<br>
|
||||
Example:<br>
|
||||
>>> t = <a href="#-Scale">Scale</a>(2, 3)<br>
|
||||
>>> t.<a href="#Transform-transformPoints">transformPoints</a>([(0, 0), (0, 100), (100, 100), (100, 0)])<br>
|
||||
[(0, 0), (0, 300), (200, 300), (200, 0)]<br>
|
||||
>>></tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="Transform-translate"><strong>translate</strong></a>(self, x<font color="#909090">=0</font>, y<font color="#909090">=0</font>)</dt><dd><tt>Return a new transformation, translated (offset) by x, y.<br>
|
||||
<br>
|
||||
Example:<br>
|
||||
>>> t = <a href="#Transform">Transform</a>()<br>
|
||||
>>> t.<a href="#Transform-translate">translate</a>(20, 30)<br>
|
||||
<<a href="#Transform">Transform</a> [1 0 0 1 20 30]><br>
|
||||
>>></tt></dd></dl>
|
||||
|
||||
</td></tr></table></td></tr></table><p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#eeaa77">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td>
|
||||
<td width="100%"><dl><dt><a name="-Offset"><strong>Offset</strong></a>(x<font color="#909090">=0</font>, y<font color="#909090">=0</font>)</dt><dd><tt>Return the identity transformation offset by x, y.<br>
|
||||
<br>
|
||||
Example:<br>
|
||||
>>> <a href="#-Offset">Offset</a>(2, 3)<br>
|
||||
<<a href="#Transform">Transform</a> [1 0 0 1 2 3]><br>
|
||||
>>></tt></dd></dl>
|
||||
<dl><dt><a name="-Scale"><strong>Scale</strong></a>(x, y<font color="#909090">=None</font>)</dt><dd><tt>Return the identity transformation scaled by x, y. The 'y' argument<br>
|
||||
may be None, which implies to use the x value for y as well.<br>
|
||||
<br>
|
||||
Example:<br>
|
||||
>>> <a href="#-Scale">Scale</a>(2, 3)<br>
|
||||
<<a href="#Transform">Transform</a> [2 0 0 3 0 0]><br>
|
||||
>>></tt></dd></dl>
|
||||
</td></tr></table><p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#55aa55">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td>
|
||||
<td width="100%"><strong>Identity</strong> = <Transform [1 0 0 1 0 0]><br>
|
||||
<strong>__all__</strong> = ['Transform', 'Identity', 'Offset', 'Scale']</td></tr></table>
|
||||
</body></html>
|
103
Documentation/fontToolsDocs/fontTools.nfntLib.html
Normal file
103
Documentation/fontToolsDocs/fontTools.nfntLib.html
Normal file
@ -0,0 +1,103 @@
|
||||
|
||||
<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html><head><title>Python: module fontTools.nfntLib</title>
|
||||
</head><body bgcolor="#f0f0f8">
|
||||
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
|
||||
<tr bgcolor="#7799ee">
|
||||
<td valign=bottom> <br>
|
||||
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong><a href="fontTools.html"><font color="#ffffff">fontTools</font></a>.nfntLib</strong></big></big></font></td
|
||||
><td align=right valign=bottom
|
||||
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/code/fontTools/Lib/fontTools/nfntLib.py">/code/fontTools/Lib/fontTools/nfntLib.py</a></font></td></tr></table>
|
||||
<p></p>
|
||||
<p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#aa55cc">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td>
|
||||
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="sstruct.html">sstruct</a><br>
|
||||
</td><td width="25%" valign=top><a href="string.html">string</a><br>
|
||||
</td><td width="25%" valign=top><a href="struct.html">struct</a><br>
|
||||
</td><td width="25%" valign=top><a href="types.html">types</a><br>
|
||||
</td></tr></table></td></tr></table><p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#ee77aa">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td>
|
||||
<td width="100%"><dl>
|
||||
<dt><font face="helvetica, arial"><a href="fontTools.nfntLib.html#Glyph">Glyph</a>
|
||||
</font></dt><dt><font face="helvetica, arial"><a href="fontTools.nfntLib.html#NFNT">NFNT</a>
|
||||
</font></dt></dl>
|
||||
<p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#ffc8d8">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#000000" face="helvetica, arial"><a name="Glyph">class <strong>Glyph</strong></a></font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
|
||||
<td width="100%">Methods defined here:<br>
|
||||
<dl><dt><a name="Glyph-__init__"><strong>__init__</strong></a>(self, width, offset, pixels<font color="#909090">=None</font>, pixelDepth<font color="#909090">=1</font>)</dt></dl>
|
||||
|
||||
</td></tr></table> <p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#ffc8d8">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#000000" face="helvetica, arial"><a name="NFNT">class <strong>NFNT</strong></a></font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
|
||||
<td width="100%">Methods defined here:<br>
|
||||
<dl><dt><a name="NFNT-__getitem__"><strong>__getitem__</strong></a>(self, charNum)</dt></dl>
|
||||
|
||||
<dl><dt><a name="NFNT-__init__"><strong>__init__</strong></a>(self, data<font color="#909090">=None</font>)</dt></dl>
|
||||
|
||||
<dl><dt><a name="NFNT-__len__"><strong>__len__</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="NFNT-__setitem__"><strong>__setitem__</strong></a>(self, charNum, glyph)</dt></dl>
|
||||
|
||||
<dl><dt><a name="NFNT-charwidth"><strong>charwidth</strong></a>(self, ch)</dt></dl>
|
||||
|
||||
<dl><dt><a name="NFNT-compile"><strong>compile</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="NFNT-createQdBitImage"><strong>createQdBitImage</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="NFNT-decompile"><strong>decompile</strong></a>(self, data)</dt></dl>
|
||||
|
||||
<dl><dt><a name="NFNT-drawchar"><strong>drawchar</strong></a>(self, ch, destbits, xOffset, yOffset<font color="#909090">=0</font>)</dt></dl>
|
||||
|
||||
<dl><dt><a name="NFNT-drawstring"><strong>drawstring</strong></a>(self, astring, destbits, xOffset<font color="#909090">=0</font>, yOffset<font color="#909090">=0</font>)</dt></dl>
|
||||
|
||||
<dl><dt><a name="NFNT-getMissing"><strong>getMissing</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="NFNT-getcharbounds"><strong>getcharbounds</strong></a>(self, ch)</dt></dl>
|
||||
|
||||
<dl><dt><a name="NFNT-getcharboundsindex"><strong>getcharboundsindex</strong></a>(self, cindex)</dt></dl>
|
||||
|
||||
<dl><dt><a name="NFNT-packGlyphs"><strong>packGlyphs</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="NFNT-stringwidth"><strong>stringwidth</strong></a>(self, astring)</dt></dl>
|
||||
|
||||
<dl><dt><a name="NFNT-unpackGlyphs"><strong>unpackGlyphs</strong></a>(self)</dt></dl>
|
||||
|
||||
</td></tr></table></td></tr></table><p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#eeaa77">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td>
|
||||
<td width="100%"><dl><dt><a name="-dataFromFile"><strong>dataFromFile</strong></a>(pathOrFSSpec, nameOrID<font color="#909090">=''</font>, resType<font color="#909090">='NFNT'</font>)</dt></dl>
|
||||
<dl><dt><a name="-fromFile"><strong>fromFile</strong></a>(pathOrFSSpec, nameOrID<font color="#909090">=''</font>, resType<font color="#909090">='NFNT'</font>)</dt></dl>
|
||||
</td></tr></table><p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#55aa55">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td>
|
||||
<td width="100%"><strong>headerSize</strong> = 26<br>
|
||||
<strong>nfntHeaderFormat</strong> = '<font color="#c040c0">\n\t</font>> # big endian<font color="#c040c0">\n\t</font>fontType: h # font typ...<font color="#c040c0">\t</font>rowWords: h # row width of bit image / 2<font color="#c040c0">\n</font>'</td></tr></table>
|
||||
</body></html>
|
180
Documentation/fontToolsDocs/fontTools.pens.basePen.html
Normal file
180
Documentation/fontToolsDocs/fontTools.pens.basePen.html
Normal file
@ -0,0 +1,180 @@
|
||||
|
||||
<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html><head><title>Python: module fontTools.pens.basePen</title>
|
||||
</head><body bgcolor="#f0f0f8">
|
||||
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
|
||||
<tr bgcolor="#7799ee">
|
||||
<td valign=bottom> <br>
|
||||
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong><a href="fontTools.html"><font color="#ffffff">fontTools</font></a>.<a href="fontTools.pens.html"><font color="#ffffff">pens</font></a>.basePen</strong></big></big></font></td
|
||||
><td align=right valign=bottom
|
||||
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/code/fontTools/Lib/fontTools/pens/basePen.py">/code/fontTools/Lib/fontTools/pens/basePen.py</a></font></td></tr></table>
|
||||
<p><tt>fontTools.pens.basePen.py -- Tools and base classes to build pen objects.<br>
|
||||
<br>
|
||||
The Pen Protocol<br>
|
||||
<br>
|
||||
A Pen is a kind of object that standardizes the way how to "draw" outlines:<br>
|
||||
it is a middle man between an outline and a drawing. In other words:<br>
|
||||
it is an abstraction for drawing outlines, making sure that outline objects<br>
|
||||
don't need to know the details about how and where they're being drawn, and<br>
|
||||
that drawings don't need to know the details of how outlines are stored.<br>
|
||||
<br>
|
||||
The most basic pattern is this:<br>
|
||||
<br>
|
||||
outline.draw(pen) # 'outline' draws itself onto 'pen'<br>
|
||||
<br>
|
||||
Pens can be used to render outlines to the screen, but also to construct<br>
|
||||
new outlines. Eg. an outline object can be both a drawable object (it has a<br>
|
||||
draw() method) as well as a pen itself: you *build* an outline using pen<br>
|
||||
methods.<br>
|
||||
<br>
|
||||
The <a href="#AbstractPen">AbstractPen</a> class defines the Pen protocol. It implements almost<br>
|
||||
nothing (only no-op closePath() and endPath() methods), but is useful<br>
|
||||
for documentation purposes. Subclassing it basically tells the reader:<br>
|
||||
"this class implements the Pen protocol.". An examples of an <a href="#AbstractPen">AbstractPen</a><br>
|
||||
subclass is fontTools.pens.transformPen.TransformPen.<br>
|
||||
<br>
|
||||
The <a href="#BasePen">BasePen</a> class is a base implementation useful for pens that actually<br>
|
||||
draw (for example a pen renders outlines using a native graphics engine).<br>
|
||||
<a href="#BasePen">BasePen</a> contains a lot of base functionality, making it very easy to build<br>
|
||||
a pen that fully conforms to the pen protocol. Note that if you subclass<br>
|
||||
<a href="#BasePen">BasePen</a>, you _don't_ override moveTo(), lineTo(), etc., but _moveTo(),<br>
|
||||
_lineTo(), etc. See the <a href="#BasePen">BasePen</a> doc string for details. Examples of<br>
|
||||
<a href="#BasePen">BasePen</a> subclasses are fontTools.pens.boundsPen.BoundsPen and<br>
|
||||
fontTools.pens.cocoaPen.CocoaPen.<br>
|
||||
<br>
|
||||
Coordinates are usually expressed as (x, y) tuples, but generally any<br>
|
||||
sequence of length 2 will do.</tt></p>
|
||||
<p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#ee77aa">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td>
|
||||
<td width="100%"><dl>
|
||||
<dt><font face="helvetica, arial"><a href="fontTools.pens.basePen.html#AbstractPen">AbstractPen</a>
|
||||
</font></dt><dd>
|
||||
<dl>
|
||||
<dt><font face="helvetica, arial"><a href="fontTools.pens.basePen.html#BasePen">BasePen</a>
|
||||
</font></dt></dl>
|
||||
</dd>
|
||||
</dl>
|
||||
<p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#ffc8d8">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#000000" face="helvetica, arial"><a name="AbstractPen">class <strong>AbstractPen</strong></a></font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
|
||||
<td width="100%">Methods defined here:<br>
|
||||
<dl><dt><a name="AbstractPen-addComponent"><strong>addComponent</strong></a>(self, glyphName, transformation)</dt><dd><tt>Add a sub glyph. The 'transformation' argument must be a 6-tuple<br>
|
||||
containing an affine transformation, or a Transform object from the<br>
|
||||
fontTools.misc.transform module. More precisely: it should be a<br>
|
||||
sequence containing 6 numbers.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="AbstractPen-closePath"><strong>closePath</strong></a>(self)</dt><dd><tt>Close the current sub path. You must call either pen.<a href="#AbstractPen-closePath">closePath</a>()<br>
|
||||
or pen.<a href="#AbstractPen-endPath">endPath</a>() after each sub path.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="AbstractPen-curveTo"><strong>curveTo</strong></a>(self, *points)</dt><dd><tt>Draw a cubic bezier with an arbitrary number of control points.<br>
|
||||
<br>
|
||||
The last point specified is on-curve, all others are off-curve<br>
|
||||
(control) points. If the number of control points is > 2, the<br>
|
||||
segment is split into multiple bezier segments. This works<br>
|
||||
like this:<br>
|
||||
<br>
|
||||
Let n be the number of control points (which is the number of<br>
|
||||
arguments to this call minus 1). If n==2, a plain vanilla cubic<br>
|
||||
bezier is drawn. If n==1, we fall back to a quadratic segment and<br>
|
||||
if n==0 we draw a straight line. It gets interesting when n>2:<br>
|
||||
n-1 PostScript-style cubic segments will be drawn as if it were<br>
|
||||
one curve. See <a href="#-decomposeSuperBezierSegment">decomposeSuperBezierSegment</a>().<br>
|
||||
<br>
|
||||
The conversion algorithm used for n>2 is inspired by NURB<br>
|
||||
splines, and is conceptually equivalent to the TrueType "implied<br>
|
||||
points" principle. See also <a href="#-decomposeQuadraticSegment">decomposeQuadraticSegment</a>().</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="AbstractPen-endPath"><strong>endPath</strong></a>(self)</dt><dd><tt>End the current sub path, but don't close it. You must call<br>
|
||||
either pen.<a href="#AbstractPen-closePath">closePath</a>() or pen.<a href="#AbstractPen-endPath">endPath</a>() after each sub path.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="AbstractPen-lineTo"><strong>lineTo</strong></a>(self, pt)</dt><dd><tt>Draw a straight line from the current point to 'pt'.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="AbstractPen-moveTo"><strong>moveTo</strong></a>(self, pt)</dt><dd><tt>Begin a new sub path, set the current point to 'pt'. You must<br>
|
||||
end each sub path with a call to pen.<a href="#AbstractPen-closePath">closePath</a>() or pen.<a href="#AbstractPen-endPath">endPath</a>().</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="AbstractPen-qCurveTo"><strong>qCurveTo</strong></a>(self, *points)</dt><dd><tt>Draw a whole string of quadratic curve segments.<br>
|
||||
<br>
|
||||
The last point specified is on-curve, all others are off-curve<br>
|
||||
points.<br>
|
||||
<br>
|
||||
This method implements TrueType-style curves, breaking up curves<br>
|
||||
using 'implied points': between each two consequtive off-curve points,<br>
|
||||
there is one implied point exactly in the middle between them. See<br>
|
||||
also <a href="#-decomposeQuadraticSegment">decomposeQuadraticSegment</a>().<br>
|
||||
<br>
|
||||
The last argument (normally the on-curve point) may be None.<br>
|
||||
This is to support contours that have NO on-curve points (a rarely<br>
|
||||
seen feature of TrueType outlines).</tt></dd></dl>
|
||||
|
||||
</td></tr></table> <p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#ffc8d8">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#000000" face="helvetica, arial"><a name="BasePen">class <strong>BasePen</strong></a>(<a href="fontTools.pens.basePen.html#AbstractPen">AbstractPen</a>)</font></td></tr>
|
||||
|
||||
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
||||
<td colspan=2><tt>Base class for drawing pens. You must override _moveTo, _lineTo and<br>
|
||||
_curveToOne. You may additionally override _closePath, _endPath,<br>
|
||||
addComponent and/or _qCurveToOne. You should not override any other<br>
|
||||
methods.<br> </tt></td></tr>
|
||||
<tr><td> </td>
|
||||
<td width="100%">Methods defined here:<br>
|
||||
<dl><dt><a name="BasePen-__init__"><strong>__init__</strong></a>(self, glyphSet)</dt></dl>
|
||||
|
||||
<dl><dt><a name="BasePen-addComponent"><strong>addComponent</strong></a>(self, glyphName, transformation)</dt><dd><tt>This default implementation simply transforms the points<br>
|
||||
of the base glyph and draws it onto self.</tt></dd></dl>
|
||||
|
||||
<dl><dt><a name="BasePen-closePath"><strong>closePath</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="BasePen-curveTo"><strong>curveTo</strong></a>(self, *points)</dt></dl>
|
||||
|
||||
<dl><dt><a name="BasePen-endPath"><strong>endPath</strong></a>(self)</dt></dl>
|
||||
|
||||
<dl><dt><a name="BasePen-lineTo"><strong>lineTo</strong></a>(self, pt)</dt></dl>
|
||||
|
||||
<dl><dt><a name="BasePen-moveTo"><strong>moveTo</strong></a>(self, pt)</dt></dl>
|
||||
|
||||
<dl><dt><a name="BasePen-qCurveTo"><strong>qCurveTo</strong></a>(self, *points)</dt></dl>
|
||||
|
||||
</td></tr></table></td></tr></table><p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#eeaa77">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td>
|
||||
<td width="100%"><dl><dt><a name="-decomposeQuadraticSegment"><strong>decomposeQuadraticSegment</strong></a>(points)</dt><dd><tt>Split the quadratic curve segment described by 'points' into a list<br>
|
||||
of "atomic" quadratic segments. The 'points' argument must be a sequence<br>
|
||||
with length 2 or greater, containing (x, y) coordinates. The last point<br>
|
||||
is the destination on-curve point, the rest of the points are off-curve<br>
|
||||
points. The start point should not be supplied.<br>
|
||||
<br>
|
||||
This function returns a list of (pt1, pt2) tuples, which each specify a<br>
|
||||
plain quadratic bezier segment.</tt></dd></dl>
|
||||
<dl><dt><a name="-decomposeSuperBezierSegment"><strong>decomposeSuperBezierSegment</strong></a>(points)</dt><dd><tt>Split the SuperBezier described by 'points' into a list of regular<br>
|
||||
bezier segments. The 'points' argument must be a sequence with length<br>
|
||||
3 or greater, containing (x, y) coordinates. The last point is the<br>
|
||||
destination on-curve point, the rest of the points are off-curve points.<br>
|
||||
The start point should not be supplied.<br>
|
||||
<br>
|
||||
This function returns a list of (pt1, pt2, pt3) tuples, which each<br>
|
||||
specify a regular curveto-style bezier segment.</tt></dd></dl>
|
||||
</td></tr></table><p>
|
||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
||||
<tr bgcolor="#55aa55">
|
||||
<td colspan=3 valign=bottom> <br>
|
||||
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
|
||||
|
||||
<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td>
|
||||
<td width="100%"><strong>__all__</strong> = ['AbstractPen', 'BasePen', 'decomposeSuperBezierSegment', 'decomposeQuadraticSegment']</td></tr></table>
|
||||
</body></html>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user