summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--out/RobotoCondensedTTF/RobotoCondensed-Bold.ttfbin127336 -> 127340 bytes
-rw-r--r--out/RobotoCondensedTTF/RobotoCondensed-BoldItalic.ttfbin135512 -> 135504 bytes
-rw-r--r--out/RobotoCondensedTTF/RobotoCondensed-Italic.ttfbin133916 -> 133908 bytes
-rw-r--r--out/RobotoCondensedTTF/RobotoCondensed-Light.ttfbin126172 -> 126168 bytes
-rw-r--r--out/RobotoCondensedTTF/RobotoCondensed-LightItalic.ttfbin134668 -> 134544 bytes
-rw-r--r--out/RobotoCondensedTTF/RobotoCondensed-Regular.ttfbin125332 -> 125332 bytes
-rw-r--r--out/RobotoTTF/Roboto-Black.ttfbin127944 -> 127948 bytes
-rw-r--r--out/RobotoTTF/Roboto-BlackItalic.ttfbin134724 -> 134716 bytes
-rw-r--r--out/RobotoTTF/Roboto-Bold.ttfbin127740 -> 127744 bytes
-rw-r--r--out/RobotoTTF/Roboto-BoldItalic.ttfbin134568 -> 134556 bytes
-rw-r--r--out/RobotoTTF/Roboto-Italic.ttfbin132448 -> 132440 bytes
-rw-r--r--out/RobotoTTF/Roboto-Light.ttfbin126796 -> 126792 bytes
-rw-r--r--out/RobotoTTF/Roboto-LightItalic.ttfbin133188 -> 133172 bytes
-rw-r--r--out/RobotoTTF/Roboto-Medium.ttfbin127488 -> 127488 bytes
-rw-r--r--out/RobotoTTF/Roboto-MediumItalic.ttfbin134312 -> 134312 bytes
-rw-r--r--out/RobotoTTF/Roboto-Regular.ttfbin126072 -> 126072 bytes
-rw-r--r--out/RobotoTTF/Roboto-Thin.ttfbin127584 -> 127584 bytes
-rw-r--r--out/RobotoTTF/Roboto-ThinItalic.ttfbin132868 -> 132860 bytes
-rwxr-xr-xres/buildnumber.txt2
-rwxr-xr-xres/diacritics.txt12
-rwxr-xr-xscripts/build-v2.py18
-rwxr-xr-xscripts/lib/fontbuild/Build.py3
-rw-r--r--scripts/lib/fontbuild/italics.py71
-rw-r--r--scripts/lib/fontbuild/italics2.py148
-rw-r--r--src/v2/Roboto_Bold.vfbbin149674 -> 149678 bytes
-rw-r--r--src/v2/Roboto_Regular.vfbbin137841 -> 137844 bytes
-rw-r--r--src/v2/Roboto_Thin.vfbbin144009 -> 144010 bytes
27 files changed, 54 insertions, 200 deletions
diff --git a/out/RobotoCondensedTTF/RobotoCondensed-Bold.ttf b/out/RobotoCondensedTTF/RobotoCondensed-Bold.ttf
index 0af1377..1079af6 100644
--- a/out/RobotoCondensedTTF/RobotoCondensed-Bold.ttf
+++ b/out/RobotoCondensedTTF/RobotoCondensed-Bold.ttf
Binary files differ
diff --git a/out/RobotoCondensedTTF/RobotoCondensed-BoldItalic.ttf b/out/RobotoCondensedTTF/RobotoCondensed-BoldItalic.ttf
index 632373d..e7f13c2 100644
--- a/out/RobotoCondensedTTF/RobotoCondensed-BoldItalic.ttf
+++ b/out/RobotoCondensedTTF/RobotoCondensed-BoldItalic.ttf
Binary files differ
diff --git a/out/RobotoCondensedTTF/RobotoCondensed-Italic.ttf b/out/RobotoCondensedTTF/RobotoCondensed-Italic.ttf
index 685d5ea..7fa0448 100644
--- a/out/RobotoCondensedTTF/RobotoCondensed-Italic.ttf
+++ b/out/RobotoCondensedTTF/RobotoCondensed-Italic.ttf
Binary files differ
diff --git a/out/RobotoCondensedTTF/RobotoCondensed-Light.ttf b/out/RobotoCondensedTTF/RobotoCondensed-Light.ttf
index a0da7d2..96b75dd 100644
--- a/out/RobotoCondensedTTF/RobotoCondensed-Light.ttf
+++ b/out/RobotoCondensedTTF/RobotoCondensed-Light.ttf
Binary files differ
diff --git a/out/RobotoCondensedTTF/RobotoCondensed-LightItalic.ttf b/out/RobotoCondensedTTF/RobotoCondensed-LightItalic.ttf
index 54dda09..7a2c164 100644
--- a/out/RobotoCondensedTTF/RobotoCondensed-LightItalic.ttf
+++ b/out/RobotoCondensedTTF/RobotoCondensed-LightItalic.ttf
Binary files differ
diff --git a/out/RobotoCondensedTTF/RobotoCondensed-Regular.ttf b/out/RobotoCondensedTTF/RobotoCondensed-Regular.ttf
index 2cc0d68..734cc40 100644
--- a/out/RobotoCondensedTTF/RobotoCondensed-Regular.ttf
+++ b/out/RobotoCondensedTTF/RobotoCondensed-Regular.ttf
Binary files differ
diff --git a/out/RobotoTTF/Roboto-Black.ttf b/out/RobotoTTF/Roboto-Black.ttf
index 18cf2ae..2cdbe43 100644
--- a/out/RobotoTTF/Roboto-Black.ttf
+++ b/out/RobotoTTF/Roboto-Black.ttf
Binary files differ
diff --git a/out/RobotoTTF/Roboto-BlackItalic.ttf b/out/RobotoTTF/Roboto-BlackItalic.ttf
index 1fce328..9086791 100644
--- a/out/RobotoTTF/Roboto-BlackItalic.ttf
+++ b/out/RobotoTTF/Roboto-BlackItalic.ttf
Binary files differ
diff --git a/out/RobotoTTF/Roboto-Bold.ttf b/out/RobotoTTF/Roboto-Bold.ttf
index 7e43dd2..15c9b4e 100644
--- a/out/RobotoTTF/Roboto-Bold.ttf
+++ b/out/RobotoTTF/Roboto-Bold.ttf
Binary files differ
diff --git a/out/RobotoTTF/Roboto-BoldItalic.ttf b/out/RobotoTTF/Roboto-BoldItalic.ttf
index b8f3165..a0abf30 100644
--- a/out/RobotoTTF/Roboto-BoldItalic.ttf
+++ b/out/RobotoTTF/Roboto-BoldItalic.ttf
Binary files differ
diff --git a/out/RobotoTTF/Roboto-Italic.ttf b/out/RobotoTTF/Roboto-Italic.ttf
index b84e93c..67b5394 100644
--- a/out/RobotoTTF/Roboto-Italic.ttf
+++ b/out/RobotoTTF/Roboto-Italic.ttf
Binary files differ
diff --git a/out/RobotoTTF/Roboto-Light.ttf b/out/RobotoTTF/Roboto-Light.ttf
index 46c6fbc..d9fb64a 100644
--- a/out/RobotoTTF/Roboto-Light.ttf
+++ b/out/RobotoTTF/Roboto-Light.ttf
Binary files differ
diff --git a/out/RobotoTTF/Roboto-LightItalic.ttf b/out/RobotoTTF/Roboto-LightItalic.ttf
index e11331d..1fd1d31 100644
--- a/out/RobotoTTF/Roboto-LightItalic.ttf
+++ b/out/RobotoTTF/Roboto-LightItalic.ttf
Binary files differ
diff --git a/out/RobotoTTF/Roboto-Medium.ttf b/out/RobotoTTF/Roboto-Medium.ttf
index 433bca4..c63c115 100644
--- a/out/RobotoTTF/Roboto-Medium.ttf
+++ b/out/RobotoTTF/Roboto-Medium.ttf
Binary files differ
diff --git a/out/RobotoTTF/Roboto-MediumItalic.ttf b/out/RobotoTTF/Roboto-MediumItalic.ttf
index 7166eb7..cd7c835 100644
--- a/out/RobotoTTF/Roboto-MediumItalic.ttf
+++ b/out/RobotoTTF/Roboto-MediumItalic.ttf
Binary files differ
diff --git a/out/RobotoTTF/Roboto-Regular.ttf b/out/RobotoTTF/Roboto-Regular.ttf
index 7180d51..9cb4a5a 100644
--- a/out/RobotoTTF/Roboto-Regular.ttf
+++ b/out/RobotoTTF/Roboto-Regular.ttf
Binary files differ
diff --git a/out/RobotoTTF/Roboto-Thin.ttf b/out/RobotoTTF/Roboto-Thin.ttf
index 9792ed1..f02f100 100644
--- a/out/RobotoTTF/Roboto-Thin.ttf
+++ b/out/RobotoTTF/Roboto-Thin.ttf
Binary files differ
diff --git a/out/RobotoTTF/Roboto-ThinItalic.ttf b/out/RobotoTTF/Roboto-ThinItalic.ttf
index 5366fe5..12a2ce0 100644
--- a/out/RobotoTTF/Roboto-ThinItalic.ttf
+++ b/out/RobotoTTF/Roboto-ThinItalic.ttf
Binary files differ
diff --git a/res/buildnumber.txt b/res/buildnumber.txt
index 5d27c6e..cdc3179 100755
--- a/res/buildnumber.txt
+++ b/res/buildnumber.txt
@@ -1 +1 @@
-00976 \ No newline at end of file
+00980 \ No newline at end of file
diff --git a/res/diacritics.txt b/res/diacritics.txt
index 5c12d4a..fda26bb 100755
--- a/res/diacritics.txt
+++ b/res/diacritics.txt
@@ -76,7 +76,7 @@ c+dotaccent:top=uni010B
C+caron:top=Ccaron
c+caron:top=ccaron
D+caron:top=Dcaron
-d+commaaccent:caron=dcaron/0,150
+d+quoteright:caron=dcaron/0,150
E+macron:top=Emacron
e+macron:top=emacron
E+breve:top=Ebreve
@@ -116,8 +116,8 @@ L+acute:top=Lacute
l+acute:top=lacute
L+commaaccent:bottom=Lcommaaccent
l+commaaccent:bottom=lcommaaccent
-L+commaaccent:caron=Lcaron
-l+commaaccent:caron=lcaron/0,150
+L+quoteright:caron=Lcaron
+l+quoteright:caron=lcaron/0,150
L+dotaccent:dot=Ldot
l+dotaccent:dot=ldot/0,220
N+acute:top=Nacute
@@ -126,7 +126,7 @@ N+commaaccent:bottom=Ncommaaccent
n+commaaccent:bottom=ncommaaccent
N+caron:top=Ncaron
n+caron:top=ncaron
-n+commaaccent:caron=napostrophe
+n+quoteright:caron=napostrophe
O+macron:top=Omacron
o+macron:top=omacron
O+breve:top=Obreve
@@ -154,7 +154,7 @@ t+commaaccent:bottom=uni021B
T+cedilla:bottom=uni0162
t+cedilla:bottom=uni0163
T+caron:top=Tcaron
-t+commaaccent:caron=tcaron/0,40
+t+quoteright:caron=tcaron/0,40
U+tilde:top=Utilde
u+tilde:top=utilde
U+macron:top=Umacron
@@ -242,7 +242,7 @@ J.smcp+circumflex:top=Jcircumflex.smcp
K.smcp+commaaccent:bottom=Kcommaaccent.smcp
L.smcp+acute:top=Lacute.smcp
L.smcp+commaaccent:bottom=Lcommaaccent.smcp
-L.smcp+commaaccent:caron=Lcaron.smcp
+L.smcp+quoteright:caron=Lcaron.smcp
L.smcp+dotaccent:dot=Ldot.smcp
N.smcp+acute:top=Nacute.smcp
N.smcp+commaaccent:bottom=Ncommaaccent.smcp
diff --git a/scripts/build-v2.py b/scripts/build-v2.py
index f437fd0..38e062f 100755
--- a/scripts/build-v2.py
+++ b/scripts/build-v2.py
@@ -64,21 +64,17 @@ proj.incrementBuildNumber()
FAMILYNAME = "Roboto"
proj.generateFont(th.font,"%s/Thin/Regular/Th"%FAMILYNAME)
-proj.generateFont(th.font,"%s/Thin Italic/Italic/Th"%FAMILYNAME, italic=True, stemWidth=80)
-
proj.generateFont(Mix([th,rg], 0.45),"%s/Light/Regular/Lt"%FAMILYNAME)
-proj.generateFont(Mix([th,rg], 0.45),"%s/Light Italic/Italic/Lt"%FAMILYNAME, italic=True, stemWidth=120)
-
proj.generateFont(Mix([th,rg], Point(0.90, 0.92)),"%s/Regular/Regular/Rg"%FAMILYNAME)
-proj.generateFont(Mix([th,rg], Point(0.90, 0.92)),"%s/Italic/Italic/Rg"%FAMILYNAME, italic=True, stemWidth=185)
-
proj.generateFont(Mix([rg,bd], 0.35),"%s/Medium/Regular/Lt"%FAMILYNAME)
-proj.generateFont(Mix([rg,bd], 0.35),"%s/Medium Italic/Bold Italic/Lt"%FAMILYNAME, italic=True, stemWidth=230)
-
proj.generateFont(Mix([rg,bd], Point(0.73, 0.73)),"%s/Bold/Bold/Rg"%FAMILYNAME)
-proj.generateFont(Mix([rg,bd], Point(0.73, 0.73)),"%s/Bold Italic/Bold Italic/Rg"%FAMILYNAME, italic=True, stemWidth=290)
-
proj.generateFont(Mix([rg,bd], Point(1.125, 1.0)),"%s/Black/Bold/Bk"%FAMILYNAME)
+
+proj.generateFont(th.font,"%s/Thin Italic/Italic/Th"%FAMILYNAME, italic=True, stemWidth=80)
+proj.generateFont(Mix([th,rg], 0.45),"%s/Light Italic/Italic/Lt"%FAMILYNAME, italic=True, stemWidth=120)
+proj.generateFont(Mix([th,rg], Point(0.90, 0.92)),"%s/Italic/Italic/Rg"%FAMILYNAME, italic=True, stemWidth=185)
+proj.generateFont(Mix([rg,bd], 0.35),"%s/Medium Italic/Bold Italic/Lt"%FAMILYNAME, italic=True, stemWidth=230)
+proj.generateFont(Mix([rg,bd], Point(0.73, 0.73)),"%s/Bold Italic/Bold Italic/Rg"%FAMILYNAME, italic=True, stemWidth=290)
proj.generateFont(Mix([rg,bd], Point(1.125, 1.0)),"%s/Black Italic/Bold Italic/Bk"%FAMILYNAME, italic=True, stemWidth=290)
thcn1 = Master(condenseFont(Font(th.font), .84, 40).naked())
@@ -89,7 +85,7 @@ proj.generateFont(Mix([thcn1,cn1], Point(0.45, 0.47)), "%s Condensed/Light/Regul
proj.generateFont(Mix([thcn1,cn1], Point(0.9, 0.92)), "%s Condensed/Regular/Regular/Rg"%FAMILYNAME, swapSuffixes=[".cn"])
proj.generateFont(Mix([cn1,bdcn1], Point(0.75, 0.75)), "%s Condensed/Bold/Bold/Rg"%FAMILYNAME, swapSuffixes=[".cn"])
-proj.generateFont(Mix([thcn1,cn1], Point(0.40, 0.42)), "%s Condensed/Light Italic/Italic/Lt"%FAMILYNAME, italic=True, swapSuffixes=[".cn"], stemWidth=120)
+proj.generateFont(Mix([thcn1,cn1], Point(0.45, 0.47)), "%s Condensed/Light Italic/Italic/Lt"%FAMILYNAME, italic=True, swapSuffixes=[".cn"], stemWidth=120)
proj.generateFont(Mix([thcn1,cn1], Point(0.9, 0.92)), "%s Condensed/Italic/Italic/Rg"%FAMILYNAME, italic=True, swapSuffixes=[".cn"], stemWidth=185)
proj.generateFont(Mix([cn1,bdcn1], Point(0.75, 0.75)), "%s Condensed/Bold Italic/Bold Italic/Rg"%FAMILYNAME, italic=True, swapSuffixes=[".cn"], stemWidth=240)
diff --git a/scripts/lib/fontbuild/Build.py b/scripts/lib/fontbuild/Build.py
index d10cc9d..6ed91c3 100755
--- a/scripts/lib/fontbuild/Build.py
+++ b/scripts/lib/fontbuild/Build.py
@@ -80,6 +80,9 @@ class FontProject:
i += 1
if i % 10 == 0: print g.name
+ if g.name == "uniFFFD":
+ continue
+
# if i < 24:
# continue
# if i > 86:
diff --git a/scripts/lib/fontbuild/italics.py b/scripts/lib/fontbuild/italics.py
index 72178b4..8e12619 100644
--- a/scripts/lib/fontbuild/italics.py
+++ b/scripts/lib/fontbuild/italics.py
@@ -29,7 +29,7 @@ def italicizeGlyph(g, angle=10, stemWidth=185):
def italicize(glyph, angle=12, stemWidth=180, xoffset=-50):
CURVE_CORRECTION_WEIGHT = .03
CORNER_WEIGHT = 10
- ga,subsegments = segmentGlyph(glyph,25)
+ ga, subsegments = segmentGlyph(glyph,25)
va, e = glyphToMesh(ga)
n = len(va)
grad = mapEdges(lambda a,(p,n): normalize(p-a), va, e)
@@ -79,38 +79,6 @@ def italicize(glyph, angle=12, stemWidth=180, xoffset=-50):
# return gOut
return fitGlyph(glyph, gOut, subsegments)
-def condenseGlyph(glyph, scale=.8, stemWidth=185):
- ga, subsegments = segmentGlyph(glyph, 25)
- va, e = glyphToMesh(ga)
- n = len(va)
-
- normals = edgeNormals(va,e)
- cn = va.dot(np.array([[scale, 0],[0,1]]))
- grad = mapEdges(lambda a,(p,n): normalize(p-a), cn, e)
- # ograd = mapEdges(lambda a,(p,n): normalize(p-a), va, e)
-
- cn[:,0] -= normals[:,0] * stemWidth * .5 * (1 - scale)
- out = recompose(cn, grad, e, smooth=.5)
- # out = recompose(out, grad, e, smooth=.1)
- out = recompose(out, grad, e, smooth=.01)
-
- # cornerWeights = mapEdges(lambda a,(p,n): normalize(p-a).dot(normalize(a-n)), grad, e)[:,0].reshape((-1,1))
- # smooth = np.ones((n,1)) * .1
- # smooth[cornerWeights < .6] = 10
- #
- # grad2 = quantizeGradient(grad).astype(float)
- # grad2 = copyGradDetails(grad, grad2, e, scale=10)
- # grad2 = mapEdges(lambda a,e: normalize(a), grad2, e)
- # out = recompose(out, grad2, e, smooth=smooth)
- out[:,0] += 15
- out[:,1] = va[:,1]
- # out = recompose(out, grad, e, smooth=.5)
- gOut = meshToGlyph(out, ga)
- gOut = fitGlyph(glyph, gOut, subsegments)
- for i,seg in enumerate(gOut):
- gOut[i].points[0].y = glyph[i].points[0].y
- return gOut
-
def transformFLGlyphMembers(g, m, transformAnchors = True):
# g.transform(m)
@@ -264,4 +232,39 @@ def copyMeshDetails(va,vb,e,scale=5,smooth=.01):
gradB = mapEdges(lambda a,(p,n): normalize(p-a), vb, e)
grad = copyGradDetails(gradA, gradB, e, scale)
grad = mapEdges(lambda a,(p,n): normalize(a), grad, e)
- return recompose(vb, grad, e, smooth=smooth) \ No newline at end of file
+ return recompose(vb, grad, e, smooth=smooth)
+
+
+
+
+def condenseGlyph(glyph, scale=.8, stemWidth=185):
+ ga, subsegments = segmentGlyph(glyph, 25)
+ va, e = glyphToMesh(ga)
+ n = len(va)
+
+ normals = edgeNormals(va,e)
+ cn = va.dot(np.array([[scale, 0],[0,1]]))
+ grad = mapEdges(lambda a,(p,n): normalize(p-a), cn, e)
+ # ograd = mapEdges(lambda a,(p,n): normalize(p-a), va, e)
+
+ cn[:,0] -= normals[:,0] * stemWidth * .5 * (1 - scale)
+ out = recompose(cn, grad, e, smooth=.5)
+ # out = recompose(out, grad, e, smooth=.1)
+ out = recompose(out, grad, e, smooth=.01)
+
+ # cornerWeights = mapEdges(lambda a,(p,n): normalize(p-a).dot(normalize(a-n)), grad, e)[:,0].reshape((-1,1))
+ # smooth = np.ones((n,1)) * .1
+ # smooth[cornerWeights < .6] = 10
+ #
+ # grad2 = quantizeGradient(grad).astype(float)
+ # grad2 = copyGradDetails(grad, grad2, e, scale=10)
+ # grad2 = mapEdges(lambda a,e: normalize(a), grad2, e)
+ # out = recompose(out, grad2, e, smooth=smooth)
+ out[:,0] += 15
+ out[:,1] = va[:,1]
+ # out = recompose(out, grad, e, smooth=.5)
+ gOut = meshToGlyph(out, ga)
+ gOut = fitGlyph(glyph, gOut, subsegments)
+ for i,seg in enumerate(gOut):
+ gOut[i].points[0].y = glyph[i].points[0].y
+ return gOut \ No newline at end of file
diff --git a/scripts/lib/fontbuild/italics2.py b/scripts/lib/fontbuild/italics2.py
deleted file mode 100644
index 7eee90b..0000000
--- a/scripts/lib/fontbuild/italics2.py
+++ /dev/null
@@ -1,148 +0,0 @@
-from curveFitPen import fitGlyph,segmentGlyph
-import numpy as np
-from numpy.linalg import norm
-import math
-from scipy.sparse.linalg import cg
-
-def glyphToMesh(g):
- points = []
- edges = {}
- offset = 0
- for c in g.contours:
- if len(c) < 2:
- continue
- for i,prev,next in rangePrevNext(len(c)):
- points.append((c[i].points[0].x, c[i].points[0].y))
- edges[i + offset] = np.array([prev + offset, next + offset], dtype=int)
- offset += len(c)
- return np.array(points), edges
-
-def meshToGlyph(points, g):
- g1 = g.copy()
- j = 0
- for c in g1.contours:
- if len(c) < 2:
- continue
- for i in range(len(c)):
- c[i].points[0].x = points[j][0]
- c[i].points[0].y = points[j][1]
- j += 1
- return g1
-
-def italicize(glyph, angle=12, stemWidth=180, xoffset=-50):
- ga,subsegments = segmentGlyph(glyph,25)
- va, e = glyphToMesh(ga)
- n = len(va)
- grad = mapEdges(lambda a,(p,n): normalize(p-a), va, e)
- cornerWeights = mapEdges(lambda a,(p,n): normalize(p-a).dot(normalize(a-n)), grad, e)[:,0].reshape((-1,1))
- smooth = np.ones((n,1)) * .02
- smooth[cornerWeights < .6] = 5
- # smooth[cornerWeights >= .9999] = 2
- out = va.copy()
- if stemWidth > 100:
- out = skewMesh(poisson(skewMesh(out, angle * 2), grad, e, smooth=smooth), -angle * 2)
- out = copyMeshDetails(va, out, e, 6)
- # return meshToGlyph(out,ga)
- normals = edgeNormals(out, e)
- center = va + normals * stemWidth * .4
- if stemWidth > 100:
- center[:, 0] = va[:, 0]
- centerSkew = skewMesh(center.dot(np.array([[.97,0],[0,1]])), angle * .7)
- # centerSkew = skewMesh(center, angle * .7)
- out = out + (centerSkew - center)
- out = copyMeshDetails(skewMesh(va, angle * .7), out, e, 12)
- out = skewMesh(out, angle * .3)
- out[:,0] += xoffset
- # out[:,1] = va[:,1]
- gOut = meshToGlyph(out, ga)
- # gOut.width *= .97
- gOut.width += 10
- # return gOut
- return fitGlyph(glyph, gOut, subsegments)
-
-def poisson(v, grad, e, smooth=1, P=None, distance=None):
- n = len(v)
- if distance == None:
- distance = mapEdges(lambda a,(p,n): norm(p - a), v, e)
- if (P == None):
- P = mP(v,e)
- P += np.identity(n) * smooth
- f = v.copy()
- for i,(prev,next) in e.iteritems():
- f[i] = (grad[next] * distance[next] - grad[i] * distance[i])
- out = v.copy()
- f += v * smooth
- for i in range(len(out[0,:])):
- out[:,i] = cg(P, f[:,i])[0]
- return out
-
-def mP(v,e):
- n = len(v)
- M = np.zeros((n,n))
- for i, edges in e.iteritems():
- w = -2 / float(len(edges))
- for index in edges:
- M[i,index] = w
- M[i,i] = 2
- return M
-
-def normalize(v):
- n = np.linalg.norm(v)
- if n == 0:
- return v
- return v/n
-
-def mapEdges(func,v,e,*args):
- b = v.copy()
- for i, edges in e.iteritems():
- b[i] = func(v[i], [v[j] for j in edges], *args)
- return b
-
-def getNormal(a,b,c):
- "Assumes TT winding direction"
- p = np.roll(normalize(b - a), 1)
- n = -np.roll(normalize(c - a), 1)
- p[1] *= -1
- n[1] *= -1
- # print p, n, normalize((p + n) * .5)
- return normalize((p + n) * .5)
-
-def edgeNormals(v,e):
- "Assumes a mesh where each vertex has exactly least two edges"
- return mapEdges(lambda a,(p,n) : getNormal(a,p,n),v,e)
-
-def rangePrevNext(count):
- c = np.arange(count,dtype=int)
- r = np.vstack((c, np.roll(c, 1), np.roll(c, -1)))
- return r.T
-
-def skewMesh(v,angle):
- slope = np.tanh([math.pi * angle / 180])
- return v.dot(np.array([[1,0],[slope,1]]))
-
-
-from scipy.ndimage.filters import gaussian_filter1d as gaussian
-
-def labelConnected(e):
- label = 0
- labels = np.zeros((len(e),1))
- for i,(prev,next) in e.iteritems():
- labels[i] = label
- if next <= i:
- label += 1
- return labels
-
-def copyGradDetails(a,b,e,scale=15):
- n = len(a)
- labels = labelConnected(e)
- out = a.astype(float).copy()
- for i in range(labels[-1]+1):
- mask = (labels==i).flatten()
- out[mask,:] = gaussian(b[mask,:], scale, mode="wrap", axis=0) + a[mask,:] - gaussian(a[mask,:], scale, mode="wrap", axis=0)
- return out
-
-def copyMeshDetails(va,vb,e,scale=5,smooth=.01):
- gradA = mapEdges(lambda a,(p,n): normalize(p-a), va, e)
- gradB = mapEdges(lambda a,(p,n): normalize(p-a), vb, e)
- grad = copyGradDetails(gradA, gradB, e, scale)
- return poisson(vb, grad, e, smooth=smooth) \ No newline at end of file
diff --git a/src/v2/Roboto_Bold.vfb b/src/v2/Roboto_Bold.vfb
index 5449e7e..b26884b 100644
--- a/src/v2/Roboto_Bold.vfb
+++ b/src/v2/Roboto_Bold.vfb
Binary files differ
diff --git a/src/v2/Roboto_Regular.vfb b/src/v2/Roboto_Regular.vfb
index f51cdc4..fca68f2 100644
--- a/src/v2/Roboto_Regular.vfb
+++ b/src/v2/Roboto_Regular.vfb
Binary files differ
diff --git a/src/v2/Roboto_Thin.vfb b/src/v2/Roboto_Thin.vfb
index 6f84fba..074fdd6 100644
--- a/src/v2/Roboto_Thin.vfb
+++ b/src/v2/Roboto_Thin.vfb
Binary files differ