Opened 16 years ago

Last modified 5 years ago

#290 reopened enhancement

use a different default for wxGUI displays

Reported by: msieczka Owned by: grass-dev@…
Priority: major Milestone: 8.0.0
Component: Display Version: svn-trunk
Keywords: d.font, d.fontlist, font, sans, Cc:
CPU: All Platform: All

Description

Please use a different default font than currently, for wxGUI displays. This will improve user experience. The current default one looks really bad in legends, scale and stuff.

Attachments (4)

fonts_ugly.png (9.5 KB ) - added by msieczka 16 years ago.
ugly default font
fonts_neat.png (10.8 KB ) - added by msieczka 16 years ago.
a nice one example (Liberation Sans Regular)
default_and_sans_font.png (12.4 KB ) - added by wenzeslaus 9 years ago.
d.text "The quick brown fox jumps over the lazy dog" with default font and after export GRASS_FONT="sans" on Ubuntu 15.10
default_font_non_ascii.png (13.0 KB ) - added by wenzeslaus 9 years ago.
d.text "Příliš žluťoučký kůň úpěl ďábelské ódy" with default font

Download all attachments as: .zip

Change History (23)

comment:1 by hamish, 16 years ago

screenshot of what you mean please.

Hamish

comment:2 by msieczka, 16 years ago

Just add a scalebar or legend with labels in wxGUI display to see that letters look bad if you don't change the default font.

in reply to:  2 ; comment:3 by hamish, 16 years ago

Hamish:

screenshot of what you mean please.

Replying to msieczka:

Just add a scalebar or legend with labels in wxGUI display to see that letters look bad if you don't change the default font.

There is no wx2.8 for Debian/stable and so I can not yet run wxGUI locally. Hopefully that will be solved in the next month with the upcoming Lenny release.

I would like to see from the screenshot if the default you speak of is the romans stroke font or another, if it looks the same as in an old xmon or different/worse, and if it renders differently on your machine than on others.

Hamish

in reply to:  3 ; comment:4 by martinl, 16 years ago

Replying to hamish:

There is no wx2.8 for Debian/stable and so I can not yet run wxGUI locally. Hopefully that will be solved in the next month with the upcoming Lenny release.

Install wx2.8 from

deb http://apt.wxwidgets.org/ etch-wx main
apt-get install libwxbase2.8-0 libwxbase2.8-dbg libwxbase2.8-dev \
 	 libwxgtk2.8-0 libwxgtk2.8-dbg libwxgtk2.8-dev \
	 python-wxgtk2.8 wx2.8-doc wx2.8-examples \
	 wx2.8-headers wx2.8-i18n

Debian probably waits for wx3.0 ;-)))

in reply to:  4 comment:5 by hamish, 16 years ago

Replying to hamish:

There is no wx2.8 for Debian/stable and so I can not yet run wxGUI locally. Hopefully that will be solved in the next month with the upcoming Lenny release.

Replying to martinl:

Install wx2.8 from [wxwidgets.org]

I am aware of that but try to limit 3rd party packages from the system which have not been through Debian's QA. (it is used for other modelling and I can't afford to break anything)

Debian probably waits for wx3.0 ;-)))

wx2.8 will be in lenny. see

http://packages.qa.debian.org/w/wxwidgets2.8.html http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=463807

(with 1 RC bug which should be fixed in the next days..)

Hamish

in reply to:  4 ; comment:6 by msieczka, 16 years ago

Replying to martinl:

Replying to hamish:

There is no wx2.8 for Debian/stable and so I can not yet run wxGUI locally. Hopefully that will be solved in the next month with the upcoming Lenny release.

Install wx2.8 from

deb http://apt.wxwidgets.org/ etch-wx main
apt-get install libwxbase2.8-0 libwxbase2.8-dbg libwxbase2.8-dev \
 	 libwxgtk2.8-0 libwxgtk2.8-dbg libwxgtk2.8-dev \
	 python-wxgtk2.8 wx2.8-doc wx2.8-examples \
	 wx2.8-headers wx2.8-i18n

Debian probably waits for wx3.0 ;-)))

Yup, those work fine for me on Debian testing.

Anyway the screendumps are attached:

  • fonts_ugly.png - the default font
  • fonts_neat.png - Liberation Sans Regular (just for an example; I don't know what font would be universal on all platforms)

by msieczka, 16 years ago

Attachment: fonts_ugly.png added

ugly default font

by msieczka, 16 years ago

Attachment: fonts_neat.png added

a nice one example (Liberation Sans Regular)

in reply to:  6 ; comment:7 by glynn, 16 years ago

Replying to msieczka:

Anyway the screendumps are attached:

  • fonts_ugly.png - the default font
  • fonts_neat.png - Liberation Sans Regular (just for an example; I don't know what font would be universal on all platforms)

fonts_ugly.png is the romans stroke font. It's the default because it's guaranteed to be available on all platforms (the stroke fonts are part of GRASS). There isn't any FreeType font which is guaranteed to be available on all platforms. GRASS may not even support FreeType fonts (it's a compile-time option).

Users can change the default to something better, but we can't know which fonts (other than the stroke fonts) will be available on the user's system.

in reply to:  7 comment:8 by msieczka, 16 years ago

Resolution: invalid
Status: newclosed

Replying to glynn:

Users can change the default to something better, but we can't know which fonts (other than the stroke fonts) will be available on the user's system.

Well then I'll close this ticket as invalid.

in reply to:  7 comment:9 by wenzeslaus, 9 years ago

Component: wxGUIDisplay
Keywords: d.font d.fontlist font sans added
Milestone: 6.4.07.2.0

I'm reopening because this is still an issue. The default font is objectively bad (considering the typography customs and rules) in letters or kerning or both. Beginners are creating ugly maps and creating this association with GRASS GIS. Moreover, usage of the ugly default font is not limited to beginners as visible when looking at the pictures in documentation.

# Ubuntu 15.10
d.mon wx0
unset GRASS_FONT
d.text "The quick brown fox jumps over the lazy dog" at=0,50
export GRASS_FONT="sans"
d.text "The quick brown fox jumps over the lazy dog" at=0,40

d.text "The quick brown fox jumps over the lazy dog" with default font and after export GRASS_FONT="sans" on Ubuntu 15.10

Replying to glynn:

It's the default because it's guaranteed to be available on all platforms (the stroke fonts are part of GRASS). There isn't any FreeType font which is guaranteed to be available on all platforms.

In this case, can we enhance the collection of fonts shipped with GRASS GIS with some acceptable font where also the kerning will work? Is it possible to add something to the collection?

GRASS may not even support FreeType fonts (it's a compile-time option).

As this is not likely, perhaps we can threat this as the special case when user needs to set one of the GRASS fonts.

Users can change the default to something better but we can't know which fonts (other than the stroke fonts) will be available on the user's system.

According to recent experiences with MS Windows, where any system font was working, but the default was not, it seems the stroke fonts don't guarantee that the font will work.

It seems to me that replacing romans by something like sans in D_font(font ? font : "romans"); in lib/display/r_raster.c (I'm not sure bout other places) would improve the situation. Also there seems to be some checking of availability of a the font in system because then it goes to the GRASS fonts. So perhaps this can be leveraged to provide some fallback.

Last edited 9 years ago by wenzeslaus (previous) (diff)

by wenzeslaus, 9 years ago

Attachment: default_and_sans_font.png added

d.text "The quick brown fox jumps over the lazy dog" with default font and after export GRASS_FONT="sans" on Ubuntu 15.10

by wenzeslaus, 9 years ago

Attachment: default_font_non_ascii.png added

d.text "Příliš žluťoučký kůň úpěl ďábelské ódy" with default font

comment:10 by wenzeslaus, 9 years ago

Resolution: invalid
Status: closedreopened

Another bad feature of the default font is that it is ASCII only, so it fails with many languages and place names.

d.text "Příliš žluťoučký kůň úpěl ďábelské ódy" with default font

Produced on Ubuntu 15.10 with:

unset GRASS_FONT
d.text "Příliš žluťoučký kůň úpěl ďábelské ódy" at=0,50
export GRASS_FONT="serif"
d.text "Příliš žluťoučký kůň úpěl ďábelské ódy" at=0,40
export GRASS_FONT="sans"
d.text "Příliš žluťoučký kůň úpěl ďábelské ódy" at=0,30

comment:11 by neteler, 8 years ago

Milestone: 7.2.07.2.1

Ticket retargeted after milestone closed

comment:12 by martinl, 8 years ago

Milestone: 7.2.17.2.2

comment:13 by martinl, 7 years ago

Milestone: 7.2.27.4.0

All enhancement tickets should be assigned to 7.4 milestone.

comment:14 by neteler, 7 years ago

Milestone: 7.4.07.4.1

Ticket retargeted after milestone closed

comment:15 by neteler, 6 years ago

Milestone: 7.4.17.4.2

comment:16 by martinl, 6 years ago

Milestone: 7.4.27.6.0

All enhancement tickets should be assigned to 7.6 milestone.

comment:17 by martinl, 6 years ago

Milestone: 7.6.07.6.1

Ticket retargeted after milestone closed

comment:18 by martinl, 6 years ago

Milestone: 7.6.17.6.2

Ticket retargeted after milestone closed

comment:19 by veroandreo, 5 years ago

Milestone: 7.6.28.0.0
Version: svn-develbranch6svn-trunk

Changing milestone to 8.0.0. See comment in #3879

Note: See TracTickets for help on using tickets.