-
Notifications
You must be signed in to change notification settings - Fork 521
Open
Description
I try to set a kerning between a A and a V, is it possible ?
const notdefGlyph = new opentype.Glyph({
name: '.notdef',
unicode: 0,
advanceWidth: 650,
path: new opentype.Path()
});
const pathA = new opentype.Path();
pathA.moveTo(50, 500); pathA.lineTo(250, 0); pathA.lineTo(450, 500); pathA.moveTo(150, 250); pathA.lineTo(350, 250);
const glyphA = new opentype.Glyph({ name: 'A', unicode: 'A'.charCodeAt(0), advanceWidth: 500, path: pathA });
const pathV = new opentype.Path();
pathV.moveTo(50, 0); pathV.lineTo(250, 500); pathV.lineTo(450, 0);
const glyphV = new opentype.Glyph({ name: 'V', unicode: 'V'.charCodeAt(0), advanceWidth: 500, path: pathV });
// and
const font = new opentype.Font({
familyName: 'AVFontKerning',
styleName: 'Regular',
unitsPerEm: 1000,
ascender: 800,
descender: -200,
glyphs: [notdefGlyph, glyphA, glyphV]
});
Metadata
Metadata
Assignees
Labels
No labels