Merge branch 'master' into releases
This commit is contained in:
commit
a3883f4d0c
16
generator.js
16
generator.js
|
@ -133,11 +133,25 @@ if(argv.ttf) (function(){
|
|||
|
||||
if(argv.svg) (function(){
|
||||
console.log(' Writing outline as SVG -> ' + argv.svg);
|
||||
function cov(x){ return Math.round(x * 10000) / 10000 };
|
||||
|
||||
var foundNaN = false;
|
||||
var glyfname = '';
|
||||
function cov(x) {
|
||||
if(!isFinite(x)){
|
||||
if(!foundNaN) {
|
||||
console.log("*** NaN value found in " + argv.svg + '(' + glyfname + ')' + " ***")
|
||||
foundNaN = true
|
||||
}
|
||||
return 0
|
||||
}
|
||||
return Math.round(x * 10000) / 10000
|
||||
};
|
||||
function mix(a, b, p){ return a + (b - a) * p };
|
||||
|
||||
function toSVGPath(glyph){
|
||||
var buf = '';
|
||||
foundNaN = false;
|
||||
glyfname = glyph.name;
|
||||
if(glyph.contours) for(var j = 0; j < glyph.contours.length; j++) {
|
||||
var contour = glyph.contours[j];
|
||||
var lx = 0;
|
||||
|
|
|
@ -266,6 +266,7 @@ define [createCircledGlyphs records] : if [not recursive] : begin
|
|||
apply-transform : Translate (width / 2) (CAP / 2 * dscale)
|
||||
apply-transform : Italify
|
||||
refair this
|
||||
|
||||
include : OShape
|
||||
* (CAP * dscale + [Math.max (CAP * 0.175) (sw * 3)])
|
||||
* (-[Math.max (CAP * 0.175) (sw * 3)])
|
||||
|
@ -287,7 +288,7 @@ define [createBracedGlyphs records] : if [not recursive] : begin
|
|||
crowd -- [fallback para.smallCrowd 3.75]
|
||||
scale -- 0.65
|
||||
sbscale -- 1
|
||||
uncair -- true
|
||||
unfair -- true
|
||||
|
||||
foreach {unicode glyphid w} [items-of records] : sketch
|
||||
local width : fallback w WIDTH
|
||||
|
|
|
@ -441,6 +441,7 @@ define [determineMixR w v u sw] : begin
|
|||
local adjust : clamp 0.975 1 (1 - (iwidth / idepth - 2) * 0.0125)
|
||||
#console.log iwidth idepth (iwidth / idepth) adjust
|
||||
r = r * adjust
|
||||
if (r < 0.5) : set r 0.5
|
||||
return r
|
||||
|
||||
define nHookSegments 12
|
||||
|
|
Loading…
Reference in New Issue
Block a user