Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

question about the size of ttf file generated #1

Open
nobodxbodon opened this issue Nov 1, 2014 · 7 comments
Open

question about the size of ttf file generated #1

nobodxbodon opened this issue Nov 1, 2014 · 7 comments

Comments

@nobodxbodon
Copy link

Dear developer,

first thanks a lot for your work! I've been using it to create customized ttf in my ttf->woff tool for Chinese fonts. In one experiment, I want to create some micro ttf with 1 Chinese charactor. The original font is: 文鼎中楷簡(http://www.arphic.com/tw/download/gkai00mp.zip). First I create a ttf that only contains one charactor "文", and the file size turns out to be 53KB. After that, I create a ttf that has six charactors "文鼎开放字体", and the file size is 55KB. I wonder if you have some clue about why it's not proportional with the number of charactors?

Thanks a lot!

@wangxiaomo
Copy link
Owner

@nobodxbodon

busy with my work during this time.i'm really sorry replying so late.

i'm not quite sure about why this happened.maybe the fontforge or something else?

hope you can resolve this and let me know about its reason.

@nobodxbodon
Copy link
Author

Thanks for your response. Pitifully I still haven't got any clue yet.
Here's a sample file for "展": http://pan.baidu.com/s/1qWmGKEw
After opening it in Fontforge tool, the only glyph I can see is the one character, and all the others are "X". I've tried all the options in Fontforge to remove seemingly redundant information, but still the generated ttf file is the same size.
Here is the reference I use to re-subset in Fontforge:
http://wiki.unity3d.com/index.php?title=Create_a_new_TrueType_font_using_a_subset_of_characters_from_an_existing_TrueType_font

@nobodxbodon
Copy link
Author

Based on similar practice below: http://typophile.com/node/108057
I used fonttools: https://github.com/behdad/fonttools
And got a 1362 byte single character ttf by command below:
$ pyftsubset zhan.ttf --unicodes="U+5c55"
zhan.ttf is the 53kb file in post above.
Still need to test if the ttf actually works, but it does show the glyph when opened with Fontforge.

@wangxiaomo
Copy link
Owner

@nobodxbodon

try this way?

@nobodxbodon
Copy link
Author

The same character's output from sfnttool is 9kb, much larger than fonttools.

@wangxiaomo
Copy link
Owner

i still think it was caused by some generating engine's options.

@nobodxbodon
Copy link
Author

I agree. Pitifully i haven't figured out which option, or what the
redundant info is.
On Nov 19, 2014 12:24 AM, "wangxiaomo" [email protected] wrote:

i still think it was caused by some generating engine's options.


Reply to this email directly or view it on GitHub
#1 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants