website etc
This commit is contained in:
parent
41c4fb5160
commit
bb390dd2ae
4 changed files with 51 additions and 21 deletions
|
|
@ -620,7 +620,7 @@ for (const ch of uniqueChars) {
|
|||
},
|
||||
})
|
||||
|
||||
samples.set(ch + ' – combinations', {
|
||||
samples.set(ch + ' – combinations + words', {
|
||||
_cachedHTMLResult: null,
|
||||
toHTML() {
|
||||
if (this._cachedHTMLResult) {
|
||||
|
|
@ -649,6 +649,45 @@ for (const ch of uniqueChars) {
|
|||
return html
|
||||
}
|
||||
})
|
||||
|
||||
samples.set(ch + ' – combinations', {
|
||||
_cachedHTMLResult: null,
|
||||
toHTML() {
|
||||
if (this._cachedHTMLResult) {
|
||||
return this._cachedHTMLResult
|
||||
}
|
||||
let s = []
|
||||
for (const comb of combs1) {
|
||||
s.push(comb)
|
||||
}
|
||||
let html = s.join(' ')
|
||||
this._cachedHTMLResult = html
|
||||
return html
|
||||
}
|
||||
})
|
||||
|
||||
samples.set(ch + ' – combinations (upper case)', {
|
||||
_cachedHTMLResult: null,
|
||||
toHTML() {
|
||||
if (this._cachedHTMLResult) {
|
||||
return this._cachedHTMLResult
|
||||
}
|
||||
let s = []
|
||||
for (const comb of combs1) {
|
||||
let p = comb.indexOf(ch)
|
||||
if (p == 0) {
|
||||
s.push(comb[0].toUpperCase() + comb[1])
|
||||
} else if (p == 1) {
|
||||
s.push(comb[0] + comb[1].toUpperCase())
|
||||
} else {
|
||||
s.push(comb)
|
||||
}
|
||||
}
|
||||
let html = s.join(' ')
|
||||
this._cachedHTMLResult = html
|
||||
return html
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Binary file not shown.
|
Before Width: | Height: | Size: 723 KiB After Width: | Height: | Size: 722 KiB |
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 58 KiB |
|
|
@ -339,15 +339,6 @@ def interpolate(a,b,v,e=0):
|
|||
return le + (qe-le) * e
|
||||
|
||||
def interpolateKerns(kA, kB, v):
|
||||
# to yield correct kerning for Roboto output, we must emulate the behavior
|
||||
# of old versions of this code; namely, take the kerning values of the first
|
||||
# master instead of actually interpolating.
|
||||
# old code:
|
||||
# https://github.com/google/roboto/blob/7f083ac31241cc86d019ea6227fa508b9fcf39a6/scripts/lib/fontbuild/mix.py
|
||||
# bug:
|
||||
# https://github.com/google/roboto/issues/213
|
||||
# return dict(kA)
|
||||
|
||||
kerns = {}
|
||||
for pair, val in kA.items():
|
||||
kerns[pair] = interpolate(val, kB.get(pair, 0), v.x)
|
||||
|
|
|
|||
Reference in a new issue