1 /* Copyright (C) 2000 Free Software Foundation
3 This file is part of libgcj.
5 This software is copyrighted work licensed under the terms of the
6 Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
11 import java
.awt
.FontMetrics
;
13 public class XFontMetrics
extends FontMetrics
15 gnu
.gcj
.xlib
.Font xfont
;
17 public XFontMetrics(gnu
.gcj
.xlib
.Font xfont
, java
.awt
.Font awtFont
)
23 public int getAscent()
25 return xfont
.getAscent();
28 public int getDescent()
30 return xfont
.getDescent();
33 public int getMaxAscent()
35 return xfont
.getMaxAscent();
38 public int getMaxDescent()
40 return xfont
.getMaxDescent();
43 public int stringWidth(String str
)
45 return xfont
.getStringWidth(str
);