google / google/woff2

Decompress puts file in wrong place

Open
#79 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
1.8k
Forks
228
PR merge metrics
No merged PRs in 30d

Description

Would be very helpful if we could specify the output path for a `woff2_decompress` call. Right now, I need to run the call as follows:

cd /home/ubuntu/webfont-generator/vendor/woff2
./woff2_decompress /var/www/website.com/font.woff2

This then puts the font in the following location:

/var/www/website.ttf

This is presumably because of line #33 in `/vendor/woff2/src/woff2_decompress.cc`

string outfilename = filename.substr(0, filename.find_last_of(".")) + ".ttf";

Being able to specify the output location would address this, or else, have line #33 be smarter and store the decompressed font in the same directory from which it came.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.