Skip to content

Commit

Permalink
Merge pull request #2 from gferreira2/main
Browse files Browse the repository at this point in the history
updating PDF proofs and scripts, etc.
  • Loading branch information
sannorozco authored May 30, 2024
2 parents e6a9ef2 + 0a9f1f9 commit 5688ab8
Show file tree
Hide file tree
Showing 4,414 changed files with 53,901 additions and 1,093 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
Binary file modified Fonts/AmstelvarA2-Italic_avar2.ttf
Binary file not shown.
File renamed without changes.
File renamed without changes.
72 changes: 0 additions & 72 deletions Proofs/PDF/avar2_test-parameters.py

This file was deleted.

Binary file removed Proofs/PDF/glyphset/glyphset_Roman_BARS0.pdf
Binary file not shown.
Binary file removed Proofs/PDF/glyphset/glyphset_Roman_GRAD-300.pdf
Binary file not shown.
Binary file removed Proofs/PDF/glyphset/glyphset_Roman_GRAD500.pdf
Binary file not shown.
Binary file removed Proofs/PDF/glyphset/glyphset_Roman_WDSP0.pdf
Binary file not shown.
Binary file removed Proofs/PDF/glyphset/glyphset_Roman_WDSP1000.pdf
Binary file not shown.
Binary file removed Proofs/PDF/glyphset/glyphset_Roman_XOPQ310.pdf
Binary file not shown.
Binary file removed Proofs/PDF/glyphset/glyphset_Roman_XOPQ4.pdf
Binary file not shown.
Binary file removed Proofs/PDF/glyphset/glyphset_Roman_XSHF0.pdf
Binary file not shown.
Binary file removed Proofs/PDF/glyphset/glyphset_Roman_XSHF239.pdf
Binary file not shown.
Binary file removed Proofs/PDF/glyphset/glyphset_Roman_XSHL0.pdf
Binary file not shown.
Binary file removed Proofs/PDF/glyphset/glyphset_Roman_XSHL124.pdf
Binary file not shown.
Binary file removed Proofs/PDF/glyphset/glyphset_Roman_XSHU0.pdf
Binary file not shown.
Binary file removed Proofs/PDF/glyphset/glyphset_Roman_XSHU154.pdf
Binary file not shown.
Binary file removed Proofs/PDF/glyphset/glyphset_Roman_XSVF0.pdf
Binary file not shown.
Binary file removed Proofs/PDF/glyphset/glyphset_Roman_XSVF131.pdf
Binary file not shown.
Binary file removed Proofs/PDF/glyphset/glyphset_Roman_XSVL0.pdf
Binary file not shown.
Binary file removed Proofs/PDF/glyphset/glyphset_Roman_XSVL114.pdf
Binary file not shown.
Binary file removed Proofs/PDF/glyphset/glyphset_Roman_XSVU0.pdf
Binary file not shown.
Binary file removed Proofs/PDF/glyphset/glyphset_Roman_XSVU130.pdf
Binary file not shown.
Binary file removed Proofs/PDF/glyphset/glyphset_Roman_XTRA668.pdf
Binary file not shown.
Binary file removed Proofs/PDF/glyphset/glyphset_Roman_XTRA73.pdf
Binary file not shown.
Binary file removed Proofs/PDF/glyphset/glyphset_Roman_XTTW0.pdf
Binary file not shown.
Binary file removed Proofs/PDF/glyphset/glyphset_Roman_XTTW30.pdf
Binary file not shown.
Binary file removed Proofs/PDF/glyphset/glyphset_Roman_XUCS205.pdf
Binary file not shown.
Binary file removed Proofs/PDF/glyphset/glyphset_Roman_XUCS32.pdf
Binary file not shown.
Binary file removed Proofs/PDF/glyphset/glyphset_Roman_YOPQ204.pdf
Binary file not shown.
Binary file removed Proofs/PDF/glyphset/glyphset_Roman_YOPQ4.pdf
Binary file not shown.
Binary file removed Proofs/PDF/glyphset/glyphset_Roman_YSHF0.pdf
Binary file not shown.
Binary file removed Proofs/PDF/glyphset/glyphset_Roman_YSHF147.pdf
Binary file not shown.
Binary file removed Proofs/PDF/glyphset/glyphset_Roman_YSHL0.pdf
Binary file not shown.
Binary file removed Proofs/PDF/glyphset/glyphset_Roman_YSHL140.pdf
Binary file not shown.
Binary file removed Proofs/PDF/glyphset/glyphset_Roman_YSHU0.pdf
Binary file not shown.
Binary file removed Proofs/PDF/glyphset/glyphset_Roman_YSHU150.pdf
Binary file not shown.
Binary file removed Proofs/PDF/glyphset/glyphset_Roman_YSVF306.pdf
Binary file not shown.
Binary file removed Proofs/PDF/glyphset/glyphset_Roman_YSVF84.pdf
Binary file not shown.
Binary file removed Proofs/PDF/glyphset/glyphset_Roman_YSVL146.pdf
Binary file not shown.
Binary file removed Proofs/PDF/glyphset/glyphset_Roman_YSVL251.pdf
Binary file not shown.
Binary file removed Proofs/PDF/glyphset/glyphset_Roman_YSVU224.pdf
Binary file not shown.
Binary file removed Proofs/PDF/glyphset/glyphset_Roman_YSVU59.pdf
Binary file not shown.
Binary file removed Proofs/PDF/glyphset/glyphset_Roman_YTAS665.pdf
Binary file not shown.
Binary file removed Proofs/PDF/glyphset/glyphset_Roman_YTAS875.pdf
Binary file not shown.
Binary file removed Proofs/PDF/glyphset/glyphset_Roman_YTDE-100.pdf
Binary file not shown.
Binary file removed Proofs/PDF/glyphset/glyphset_Roman_YTDE-310.pdf
Binary file not shown.
Binary file removed Proofs/PDF/glyphset/glyphset_Roman_YTFI281.pdf
Binary file not shown.
Binary file removed Proofs/PDF/glyphset/glyphset_Roman_YTFI896.pdf
Binary file not shown.
Binary file removed Proofs/PDF/glyphset/glyphset_Roman_YTLC436.pdf
Binary file not shown.
Binary file removed Proofs/PDF/glyphset/glyphset_Roman_YTLC594.pdf
Binary file not shown.
Binary file removed Proofs/PDF/glyphset/glyphset_Roman_YTOS0.pdf
Binary file not shown.
Binary file removed Proofs/PDF/glyphset/glyphset_Roman_YTOS25.pdf
Binary file not shown.
Binary file removed Proofs/PDF/glyphset/glyphset_Roman_YTTL0.pdf
Binary file not shown.
Binary file removed Proofs/PDF/glyphset/glyphset_Roman_YTTL104.pdf
Binary file not shown.
Binary file removed Proofs/PDF/glyphset/glyphset_Roman_YTUC541.pdf
Binary file not shown.
Binary file removed Proofs/PDF/glyphset/glyphset_Roman_YTUC875.pdf
Binary file not shown.
Binary file added Proofs/PDF/glyphset_Italic.pdf
Binary file not shown.
Binary file added Proofs/PDF/glyphset_Roman.pdf
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

import os, glob
import os, glob, datetime
from fontParts.world import OpenFont
from variableValues.validation import *

Expand All @@ -13,19 +12,23 @@ def checkGlyph(g1, g2):
'unicodes' : validateUnicodes(g1, g2),
}

subFamilyName = ['Roman', 'Italic'][0]
subFamilyName = ['Roman', 'Italic'][1]
baseFolder = os.path.dirname(os.path.dirname(os.getcwd()))
sourcesFolder = os.path.join(baseFolder, 'Sources', subFamilyName)
defaultPath = os.path.join(sourcesFolder, f'AmstelvarA2-{subFamilyName}_wght400.ufo')

now = datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')

ufoPaths = glob.glob(f'{sourcesFolder}/*.ufo')
ufoPaths.remove(defaultPath)

defaultFont = OpenFont(defaultPath, showInterface=False)

ufoPaths.insert(0, defaultPath)

glyphNames = defaultFont.glyphOrder

savePDF = True

for ufoPath in ufoPaths:

Expand All @@ -35,7 +38,6 @@ def checkGlyph(g1, g2):

m = 25, 10, 10, 10
stepsX, stepsY = 41, 26
# print(stepsX*stepsY)

colorContours = 0,
colorComponents = 0.65,
Expand All @@ -45,10 +47,12 @@ def checkGlyph(g1, g2):

font('Menlo-Bold')

fontSize(9)
text(f'AmstelvarA2 {subFamilyName} {currentFont.info.styleName}', (width()/2, height()-m[0]*0.66), align='center')
fontSize(8)
text(f'AmstelvarA2 {subFamilyName}', (m[3], height()-m[0]*0.66), align='left')
text(f'{currentFont.info.styleName}', (width()/2, height()-m[0]*0.66), align='center')
text(now, (width()-m[1], height()-m[0]*0.66), align='right')

stroke(0.85)
stroke(0.75)
strokeWidth(0.5)
fill(None)
fontSize(6)
Expand All @@ -64,11 +68,14 @@ def checkGlyph(g1, g2):
if n > len(glyphNames)-1:
break

rect(x, y, stepX, stepY)

glyphName = glyphNames[n]
defaultGlyph = defaultFont[glyphName]
if glyphName not in currentFont:
# draw empty cell
rect(x, y, stepX, stepY)
line((x, y), (x + stepX, y + stepY))
line((x, y + stepY), (x + stepX, y))
n += 1
continue

currentGlyph = currentFont[glyphName]
Expand All @@ -80,6 +87,16 @@ def checkGlyph(g1, g2):
W = R-L
_x = x + (stepX - W * s) / 2
_y = y + stepY * 0.3

rect(x, y, stepX, stepY)
# draw margins
with savedState():
stroke(None)
fill(0.93)
rect(x, y, _x - x - currentGlyph.leftMargin*s, stepY)
rect(x + stepX, y, -_x + x + currentGlyph.rightMargin*s, stepY)

# draw contours / components
with savedState():
stroke(None)
if currentGlyph.components and not currentGlyph.contours:
Expand All @@ -90,32 +107,35 @@ def checkGlyph(g1, g2):
translate(_x, _y)
scale(s)
drawGlyph(currentGlyph)

else:
# draw empty cell
rect(x, y, stepX, stepY)
print(f'no bounds for {glyphName}')

with savedState():
stroke(None)
translate(x, y)
font('Menlo-Bold')
fontSize(3.5)
for check in results.keys():
if check == 'pointPositions':
continue
if results[check]:
fill(0, 1, 0)
if check == 'points' and results['pointPositions']:
fill(0, 0, 1)
else:
fill(1, 0, 0)
label = check[0].upper()
text(label, (1, 1))
w, h = textSize(label)
translate(w+0.5, 0)
if ufoPath != defaultPath:
with savedState():
stroke(None)
translate(x, y)
font('Menlo-Bold')
fontSize(3.5)
for check in results.keys():
if check == 'pointPositions':
continue
if results[check]:
fill(0, 1, 0)
if check == 'points' and results['pointPositions']:
fill(0, 0, 1)
else:
fill(1, 0, 0)
label = check[0].upper()
text(label, (1, 1))
w, h = textSize(label)
translate(w + 0.5, 0)

n += 1

pdfPath = os.path.join(os.getcwd(), f'glyphset_{subFamilyName}_{currentFont.info.styleName}.pdf')
saveImage(pdfPath)

newDrawing()

if savePDF:
pdfPath = os.path.join(os.getcwd(), f'glyphset_{subFamilyName}.pdf')
saveImage(pdfPath)
4 changes: 2 additions & 2 deletions Proofs/PDF/avar2_grid.py → Proofs/PDF/varfont-weights.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@

now = datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')

savePDF = True
savePDF = False

proofName = f'avar2_ASCII_grid_{subFamilyName}.pdf'
proofName = f'varfont-weights_{subFamilyName}.pdf'
pdfPath = os.path.join(os.getcwd(), proofName)

for opsz in opszs:
Expand Down
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 5688ab8

Please sign in to comment.