문제

I am looking for a library that will convert a ttf or otf font to a js font.

I am aware of this converter tool http://typeface.neocracy.org/fonts.html

However I would like to know how this site is making the conversion. So I can implement the conversions of the font files myself.

Ideally I am looking for a JS or PHP library to accomplish this.

도움이 되었습니까?

해결책

The converter from typeface.js uses server-side perl scripts and the sources are on Launchpad.

Here is an extract from its README:

 use TypefaceJS;

 my $typeface = TypefaceJS::new->( input_filename => "truetype_font.ttf",
 unicode_range_names => ['Basic Latin', 'Latin-1 Supplement'], );

 $typeface->write_file( output_filename => 'font.typeface.js' );

다른 팁

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top