Browse Source

Update VF

—move sources to master
—update build script to new MD hint source
sannorozco 5 years ago
parent
commit
5c993416a9

+ 32 - 7
.gitignore

@@ -1,11 +1,36 @@
+
+### OSX ###
+
 .DS_Store
 *.pyc
+.AppleDouble
+.LSOverride
+
+/instances/
+/master_ttf/
+/master_ttf_interpolatable/
+
+# Icon must end with two \r
+Icon
+
+
+# Thumbnails
+._*
+
+# Files that might appear in the root of a volume
+.DocumentRevisions-V100
+.fseventsd
+.Spotlight-V100
+.TemporaryItems
+.Trashes
+.VolumeIcon.icns
 
-RobotoCondensedOTF/
-RobotoCondensedTTF/
-RobotoCondensedUFO/
-RobotoOTF/
-RobotoTTF/
-RobotoUFO/
+# Directories potentially created on remote AFP share
+.AppleDB
+.AppleDesktop
+Network Trash Folder
+Temporary Items
+.apdisk
 
-website/
+# Compressed files
+*.zip

+ 11 - 0
Scripts/normalize.py

@@ -0,0 +1,11 @@
+intMin = 100
+intMax = 900
+
+intLocation = 100
+
+intMin = -1
+intMax = 1
+
+normalized_x = int ( 2 * int ( int (intLocation - intMin) / int (intMax - intMin) ) ) - 1
+
+print ( normalized_x )

+ 64 - 0
Scripts/removeGlyphs.py

@@ -0,0 +1,64 @@
+for f in AllFonts():
+
+    #f = CurrentFont()
+
+    # copy space-separated glyph names here
+    glyphsToRemove = "Agrave Aacute Acircumflex Atilde Adieresis Aring Ccedilla Egrave Eacute Ecircumflex Edieresis Igrave Iacute Icircumflex Idieresis Ntilde Ograve Oacute Ocircumflex Otilde Odieresis Ugrave Uacute Ucircumflex Udieresis Yacute agrave aacute acircumflex atilde adieresis aring ccedilla egrave eacute ecircumflex edieresis igrave iacute icircumflex idieresis ntilde ograve oacute ocircumflex otilde odieresis ugrave uacute ucircumflex udieresis yacute ydieresis Amacron amacron Abreve abreve Cacute cacute Ccircumflex ccircumflex uni010A Cdotaccent uni010B cdotaccent Ccaron ccaron Dcaron Emacron emacron Ebreve ebreve Edotaccent edotaccent Ecaron ecaron Gcircumflex gcircumflex Gbreve gbreve uni0120 Gdotaccent uni0121 gdotaccent Gcommaaccent gcommaaccent Hcircumflex hcircumflex Itilde itilde Imacron imacron Ibreve ibreve Idotaccent Jcircumflex jcircumflex Kcommaaccent kcommaaccent Lacute lacute Lcommaaccent lcommaaccent Nacute nacute Ncommaaccent ncommaaccent Ncaron ncaron Omacron omacron Obreve obreve Ohungarumlaut ohungarumlaut Racute racute Rcommaaccent rcommaaccent Rcaron rcaron Sacute sacute Scircumflex scircumflex Scedilla scedilla Scaron scaron uni0162 Tcedilla uni0163 tcedilla Tcaron Utilde utilde Umacron umacron Ubreve ubreve Uring uring Uhungarumlaut uhungarumlaut Wcircumflex wcircumflex Ycircumflex ycircumflex Ydieresis Zacute zacute Zdotaccent zdotaccent Zcaron zcaron Gcaron gcaron AEacute aeacute Oslashacute oslashacute uni0218 Scommaaccent uni0219 scommaaccent uni021A Tcommaaccent uni021B tcommaaccent Ymacron uni0232 ymacron uni0233 Wgrave wgrave Wacute wacute Wdieresis wdieresis Ygrave ygrave"
+#    glyphsToRemove = "Cacute cacute"
+
+    # clean up the rest of the data
+    for glyphToRemove in glyphsToRemove.split(" "):
+        
+        # # remove from keys
+        # if glyphToRemove in f.keys():
+        #     del f[glyphToRemove]
+            
+
+        # # remove from glyphOrder 
+        #  for glyphName in f.glyphOrder:
+        #      if glyphName == glyphToRemove:
+        #          del f.glyphOrder[glyphName]
+
+        # GROUPS ------------------------------------------------------------
+
+        # iterate over all groups in the font
+        for groupName in f.groups.keys():
+
+            # get the group
+            group = f.groups[groupName]
+            groupList = list(f.groups[groupName])
+
+            # if glyph is in the group, remove it
+            if glyphToRemove in group:
+                print('removing %s from group %s...' % (glyphToRemove, groupName))
+                groupList.remove(glyphToRemove)
+                f.groups[groupName] = tuple(groupList)
+
+        # KERNING -----------------------------------------------------------
+
+        # iterate over all kerning pairs in the font
+        for kerningPair in f.kerning.keys():
+
+            # if glyph is in the kerning pair, remove it
+            if glyphToRemove in kerningPair:
+                print('removing kerning pair (%s, %s)...' % kerningPair)
+                del f.kerning[kerningPair]
+
+        # COMPONENTS --------------------------------------------------------
+
+        # iterate over all glyphs in the font
+        for glyph in f:
+
+            # skip glyphs which don’t have components
+            if not glyph.components:
+                continue
+
+            # iterate over all components in glyph
+            for component in glyph.components:
+
+                # if the base glyph is the glyph to be removed
+                if component.baseGlyph == glyphToRemove:
+                    # delete the component
+                    glyph.removeComponent(component)
+
+    f.save()

+ 13 - 0
Scripts/selectAndDecomposeTranformedComponents.py

@@ -0,0 +1,13 @@
+
+#font = CurrentFont()
+
+names = ["uni0313", "uni0315", "uni1DCE", "uni1DE0", "uni1DEE", "emdash", "uni2094", "uni2DEC", "uni2E0D", "uni2E15", "uni2E1D", "uni2E32", "uni2E3A", "uni2E3B", "uniA780", "uniAB51", "commaaboverightcomb"]
+
+for font in AllFonts():
+    for glyph in font:
+        #print (unicodes)
+        if glyph.name in names:
+            glyph.selected = True 
+            print("selected " + glyph.name)
+            glyph.decompose()
+    font.save()

+ 11 - 0
Scripts/selectGlyphsToRemove.py

@@ -0,0 +1,11 @@
+
+f=CurrentFont()
+
+glyphsToRemove = "Agrave Aacute Acircumflex Atilde Adieresis Aring Ccedilla Egrave Eacute Ecircumflex Edieresis Igrave Iacute Icircumflex Idieresis Ntilde Ograve Oacute Ocircumflex Otilde Odieresis Ugrave Uacute Ucircumflex Udieresis Yacute agrave aacute acircumflex atilde adieresis aring ccedilla egrave eacute ecircumflex edieresis igrave iacute icircumflex idieresis ntilde ograve oacute ocircumflex otilde odieresis ugrave uacute ucircumflex udieresis yacute ydieresis Amacron amacron Abreve abreve Cacute cacute Ccircumflex ccircumflex uni010A uni010B Ccaron ccaron Dcaron Emacron emacron Ebreve ebreve Edotaccent edotaccent Ecaron ecaron Gcircumflex gcircumflex Gbreve gbreve uni0120 uni0121 Gcommaaccent gcommaaccent Hcircumflex hcircumflex Itilde itilde Imacron imacron Ibreve ibreve Idotaccent Jcircumflex jcircumflex Kcommaaccent kcommaaccent Lacute lacute Lcommaaccent lcommaaccent Nacute nacute Ncommaaccent ncommaaccent Ncaron ncaron Omacron omacron Obreve obreve Ohungarumlaut ohungarumlaut Racute racute Rcommaaccent rcommaaccent Rcaron rcaron Sacute sacute Scircumflex scircumflex Scedilla scedilla Scaron scaron uni0162 uni0163 Tcaron Utilde utilde Umacron umacron Ubreve ubreve Uring uring Uhungarumlaut uhungarumlaut Wcircumflex wcircumflex Ycircumflex ycircumflex Ydieresis Zacute zacute Zdotaccent zdotaccent Zcaron zcaron Gcaron gcaron AEacute aeacute Oslashacute oslashacute uni0218 uni0219 uni021A uni021B uni0232 uni0233 Wgrave wgrave Wacute wacute Wdieresis wdieresis Ygrave ygrave"
+
+for glyphToRemove in glyphsToRemove.split(" "):
+
+    #f[glyphToRemove].selected = True
+    f[glyphToRemove].clear()
+
+f.save()

+ 19 - 0
Scripts/updateMetrics.py

@@ -0,0 +1,19 @@
+for font in AllFonts():
+    print(font.info.openTypeOS2TypoLineGap)
+    print(font.info.openTypeOS2WinAscent)
+    print(font.info.openTypeOS2WinDescent)
+    print(font.info.openTypeHheaLineGap)
+    
+    font.info.openTypeHheaAscender = 1900
+    font.info.openTypeHheaDescender = -500
+    font.info.openTypeHheaLineGap = 0
+    
+    font.info.openTypeOS2TypoLineGap = 102
+    font.info.openTypeOS2WinAscent = 1946
+    font.info.openTypeOS2WinDescent = 512
+    print(font.info.openTypeOS2TypoLineGap)
+    print(font.info.openTypeOS2WinAscent)
+    print(font.info.openTypeOS2WinDescent)
+    print(font.info.openTypeHheaLineGap)
+    font.save()
+    

+ 20 - 1
build-min.sh

@@ -6,4 +6,23 @@ rm Roboto-min-VF.ttf
 ttx Roboto-min-VF.ttx
 rm Roboto-min-VF.ttx
 
-mv Roboto-min-VF.ttf fonts/Roboto-min-VF.ttf
+mv Roboto-min-VF.ttf fonts/Roboto-min-VF.ttf
+
+python -m vttLib dumpfile Hinted\ VTT/MD\ Hints/Sources/RobotoVTTSources/VTTSourceRoboto-min-VF.ttf
+
+mv Hinted\ VTT/MD\ Hints/Sources/RobotoVTTSources/VTTSourceRoboto-min-VF_VTT_Hinting.ttx fonts/VTTSourceRoboto-min-VF_VTT_Hinting.ttx
+
+python -m vttLib mergefile fonts/VTTSourceRoboto-min-VF_VTT_Hinting.ttx fonts/Roboto-min-VF.ttf
+
+rm fonts/VTTSourceRoboto-min-VF_VTT_Hinting.ttx
+
+python -m vttLib compile fonts/Roboto-min-VF.ttf
+
+rm fonts/Roboto-min-VF.ttf
+
+mv fonts/Roboto-min-VF#1.ttf fonts/Roboto-min-VF.ttf
+
+ttx -x TSI1 -x TSI3 -x TSI5 fonts/Roboto-min-VF.ttf
+rm fonts/Roboto-min-VF.ttf
+ttx fonts/Roboto-min-VF.ttx
+rm fonts/Roboto-min-VF.ttx

BIN
fonts/Roboto-min-VF.ttf


BIN
fonts/Roboto-min-VF_hinted.ttf


BIN
fonts/Roboto-min-VF_hinted.ttf.zip


Some files were not shown because too many files changed in this diff