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

Use woff-tools and eot-utils to generate woff #11

Open
copyninja opened this issue Jan 26, 2014 · 5 comments
Open

Use woff-tools and eot-utils to generate woff #11

copyninja opened this issue Jan 26, 2014 · 5 comments

Comments

@copyninja
Copy link

Hi @santhoshtr now that woff and eot files are removed which was shipped by Debian so I found a aternative to do this using tools in Debian instead of sfntly. Here is patch I've for this purpose consider merging this if it does things properly

--- a/Makefile
+++ b/Makefile
@@ -7,7 +7,7 @@
    do \
        ./generate.pe $${font}.sfd; \
        echo "Compiled the font $${font}";\
-   done 
+   done

 install: compile
 # copy ttf files to system font directory
@@ -40,8 +40,7 @@
 # generate webfonts
    @for font in `echo ${fonts}`; \
    do \
-       sfntly -w $${font}.ttf $${font}.woff; \
-       sfntly -e -x $${font}.ttf $${font}.eot; \
+       sfnt2woff -m debian/meera_woff_metadata.xml $${font}.ttf; \
+       mkeot $${font}.ttf > $${font}.eot; \
        echo "Webfonts generated for $${font}"; \
    done
-   

I'm shipping this with 1.1 of meera-tamil package, I've validated the woff font using validator but not eot. If there is issue in generated font by above snippet consider filing bug once 1.1 hits archive.

@santhoshtr
Copy link
Owner

That tools do work, but not optimal. https://people.mozilla.org/~jkew/woff/ is very outdated(Updated in 2009). WOFF conversion tools were optimized in past years for better compression. WOFF 2.0 is coming. EOT can use Microtype Express compression[1] now a days. Practically the size optimization is critical for webfonts. You can observe a big size difference with sfntly with these optimization and the normal woff conversion tools(eg: fontforge woff conversion feature).

For this font, you can see the eot size from mkeot is 54124 Bytes while the eot from sfnlty with Microtype express compression is 24535 Bytes

The patch miss debian/meera_woff_metadata.xml file.

[1] https://code.google.com/p/sfntly/wiki/MicroTypeExpress

@copyninja
Copy link
Author

I see then I would request not to merge this patch, since you removed woff and eot from source (Well I should have been clear to ask you remove only ttf file ) I came up with this approach. @jonassmedegaard this was the reason why I wasn't using these tools!. (But for some reason I forgot)

@santhoshtr on the other hand @jonassmedegaard found this tool https://github.com/ananthakumaran/webify can you tell if this tool generates the files proper? sfntly is hard to package so we are looking for alternative to generating webfonts.

@jonassmedegaard
Copy link

From a quick look into the source of webify it does not seem to mention WODD 2.0 nor Microtype Express. I have thus filed ananthakumaran/webify#8

Suggestions for other alternatives to sfntly is appreciated too.

@copyninja
Copy link
Author

@santhoshtr WOFF 2.0 is not yet finalized at least this page correct me if wrong. Are you sure woff 2.0 is supported by browsers? I couldn't find much with woff 2.0 support in browsers can you clarify on this?

@jonassmedegaard
Copy link

Right, WOFF 2.0 is future (you brought it up yourself).
I suspect support for Microtype Express is less important when also taking gzip-serving the content into account. Do you have any knowledge on that?

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

3 participants