foliojs / fontkit

An advanced font engine for Node and the browser
1.49k stars 219 forks source link

OS/2 -> codePageRange #169

Closed mLihs closed 6 years ago

mLihs commented 6 years ago

hello does the values describe the position int font file wehre I can read the supported codePages of the font ? As I read both are init32 values OS/2 -> codePageRange [value1 , value2 ] can u help me on this topic please ?

Pomax commented 6 years ago

As per https://docs.microsoft.com/en-us/typography/opentype/spec/os2#cpr, these are two int32 values that do not represent "two numbers" but instead represent 64 individual bits, with each bit corresponding to a specific codepage.

mLihs commented 6 years ago

Thank, I also found short after my post the page. i made a code pen example and it seams to work.

https://codepen.io/mlihs/pen/pZPwqR

HeitiTC: codePageRange: [ 1610744223, 3755409408 ] Roboto : codePageRange: [ 536871327, 1325465600 ]