Skip to content

Conversation

@rcanavan
Copy link

the output filename is incorrectly assembled if the input filename for woff2_compress only contains dots in the path component. Example:

$ woff2_compress /tmp/foo.bar/baz Processing /tmp/foo.bar/baz => /tmp/foo.woff2

This simple patch produces the desired output file:

Processing /tmp/foo.bar/baz => /tmp/foo.bar/baz.woff2

@rcanavan
Copy link
Author

Updated the patch to include woff2_decode and woff2_info. This should fix #79

@rsheeter rsheeter self-requested a review October 13, 2017 15:10
@rsheeter
Copy link
Contributor

The right solution is probably to take --in --out on the CLI.

From a glance at the diff I imagine this is broken on Windows still. Instead of worrying about paths I suggest just setting string outfilename = filename + ".woff2" Caller can then rename however they like.

@rcanavan
Copy link
Author

Instead of worrying about paths I suggest just setting string outfilename = filename + ".woff2"

That's actually what we were using for about a year, since it's predictable for use in scripts. I've chosen this solution because it produces "prettier" results...

@khaledhosny
Copy link
Contributor

Having an --out argument and defaulting to jut appending .woff2 to file name would be ideal.

@khaledhosny
Copy link
Contributor

Or even simply making the second argument (if provided) the output file name, so one can just say woff2_compress foo.ttf bar.woff2 or woff_decompress foo.woff2 foo.otf.

@rsheeter
Copy link
Contributor

I prefer --out (w/default sgtm) because that makes it easy to add more, e.g. --extended_metadata <where to get that from>

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

Successfully merging this pull request may close these issues.

3 participants