Android Open Source - AnkiStats Font Metrics

From Project

Back to project page AnkiStats.


The source code is released under:

GNU General Public License

If you think the Android project AnkiStats listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

/*  ww  w .  ja  v a 2s  .  co m*/
public class FontMetrics {
    private Graphics g;

    public FontMetrics(Graphics g) {
        this.g = g;
    public float stringWidth(String text){
        return g.getPaint().measureText(text);

    public float getHeight() {
        return g.getPaint().getTextSize();

    public float getHeight(boolean foo) {
        return g.getPaint().getTextSize();

Java Source Code List