opentypejs / opentype.js

Read and write OpenType fonts using JavaScript.
https://opentype.js.org/
MIT License
4.36k stars 467 forks source link

OpenType.js support the Mongolian? #431

Open mhjy opened 4 years ago

mhjy commented 4 years ago

Expected Behavior

OpenType.js support the features of the Mongolian font .

Current Behavior

OpenType.js didn't support the Mongolian font . Mongolian font need the features that isol, init, medi, fina and rlig.

GLTQaganTig.zip

Jolg42 commented 4 years ago

So init, medi, fina and rlig are already supported but I don't think isol is.

See how to use them here: https://github.com/opentypejs/opentype.js/blob/master/font-inspector.html#L139

You'll need to replace { script: 'mongo', tags: ['init', 'medi', 'fina', 'rlig'] },

mhjy commented 4 years ago

I need to give a string of Mongolian characters to get the corresponding graphic id. test

mhjy commented 4 years ago

There's only liga and rlig

function renderText() { var i; if (!font) return; textToRender = document.getElementById('textField').value; var previewCtx = document.getElementById('preview').getContext('2d'); var options = { kerning: kerning, hinting: hinting, features: { liga: ligatures, rlig: ligatures } };

mhjy commented 4 years ago

test1

mhjy commented 4 years ago

result