1 Star 1 Fork 0

刘少/jwoff2

加入 Gitee
與超過 1200 萬 開發者一起發現、參與優秀開源項目,私有倉庫也完全免費 :)
免費加入
克隆/下載
貢獻代碼
同步代碼
取消
提示: 由於 Git 不支持空文件夾,創建文件夾後會生成空的 .keep 文件
Loading...
README
MIT

jwoff2

a java wrapper for woff2 to help convert ttf/otf font to woff2 or woff2 to ttf in java

Build

  1. build woff2
git clone --recursive https://github.com/Jijun/jwoff2.git
#compile brotli
cd jwoff2/woff2/brotli
cmake .
make && sudo make install
cd ..
mkdir out
cd out
cmake ..
make
sudo make install

  1. build jwoff2
cd jwoff2
cmake .
make

Function


public static native byte[] convertTTF2WOFF2Byte(byte[] inputByte);

/**
 * convert truetype font to woff2
 * 
 * @param intputFileName
 * @param outputFileName
 * @return
 */
public static native boolean convertTTF2WOFF2(String intputFileName, String outputFileName);

/**
 * convert woff2 to truetype font
 * 
 * @param inputFileName
 * @param outputFileName
 * @return
 */
public static native boolean convertWOFF2ToTTF(String inputFileName, String outputFileName);

Run

java -Djava.library.path=<link to libjwoff2> -jar libjwoff2.jar inputfilename outputfilename [woff2ttf|ttf2woff2] 

References

Copyright (c) 2018-2019 by the jwoff2 Authors. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

簡介

a java wrapper for woff2 to help convert ttf/otf to woff2 in java 展開 收起
README
MIT
取消

發行版

暫無發行版

貢獻者

全部

近期動態

不能加載更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/coderanger/jwoff2.git
git@gitee.com:coderanger/jwoff2.git
coderanger
jwoff2
jwoff2
master

搜索幫助