Skip to content
FontMetrics for GWT \囧/
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src/main/java/us/dontcareabout/fontMetrics
.gitignore
LICENSE
README.md
README_en.md
pom.xml

README.md

FontMetrics for GWT \囧/

Click here for English version.

這是用純 GWT 重刻 FontMetrics、跟原作有 87% 相似的版本 💃

使用方式

Maven

<dependency>
	<groupId>us.dontcareabout</groupId>
	<artifactId>FontMetrics</artifactId>
	<version>0.0.1</version>
</dependency>

現在還沒有上 Maven Repository,請自己作 mvn install...... 🈚️

Code

//如果 browser 不支援 Canvas(糟糕,是世界奇觀!)
//會炸 UnsupportedOperationException
FontMetrics fm = FontMetrics.get(new Font("Times", "normal", 200));

double ascent = fm.getAscent();	//相對於 font size 的比例
You can’t perform that action at this time.