Fixes for peers' setFont implementations
Thomas Fitzsimmons
fitzsim@redhat.com
Tue Jul 29 19:03:00 GMT 2003
Hello,
This patch fixes the implementations of GtkTextFieldPeer,
GtkTextAreaPeer and GtkButtonPeer's setFont methods. Pango's font
setting mechanisms more closely resemble Java's, which eliminates the
need for XLFD-style font naming. Also, pango_font_description_set_size
expects the size parameter to be in pango units, not device units.
With this patch, it is possible to change the font family and size for
the TextField, TextArea, and Button components. Without this patch,
attempting to change the default font on one of these widgets would
cause the text to be displayed at "size 0".
Please review and comment,
Tom
2003-07-29 Thomas Fitzsimmons <fitzsim@redhat.com>
* gnu/java/awt/peer/gtk/GtkButtonPeer.java: Call getName rather
than getXLFD.
* gnu/java/awt/peer/gtk/GtkTextFieldPeer.java: Likewise.
* gnu/java/awt/peer/gtk/GtkTextAreaPeer.java: Likewise.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkButtonPeer.c
(gtkSetFont): Scale size argument by PANGO_SCALE.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextFieldPeer.c:
Likewise.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextAreaPeer.c:
Likewise.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: font.diff
Type: text/x-patch
Size: 4654 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/java-patches/attachments/20030729/b045a6bf/attachment.bin>
More information about the Java-patches
mailing list