Opened 10 years ago

Closed 8 years ago

#2450 closed enhancement (fixed)

Grass7: improve font selection dialog in GUI option for map display

Reported by: hellik Owned by: grass-dev@…
Priority: normal Milestone: 7.2.1
Component: wxGUI Version: unspecified
Keywords: fonts dialog selection d.font d.fontlist fontcap Cc:
CPU: Unspecified Platform: Unspecified

Description

in the GUI options there are 2 tabs where you can choose fonts:

(1) fonts in command output (2) fonts for map display

in (1) there is a nice dialog, for (2) the dialogue is rudimentary (see screenshot attached).

fontcap file content:

[...]
cordiaub|CordiaUPC Bold|1|C:\Windows\Fonts\cordiaub.ttf|0|utf-8|
cordiaui|CordiaUPC Italic|1|C:\Windows\Fonts\cordiaui.ttf|0|utf-8|
cordiauz|CordiaUPC Bold Italic|1|C:\Windows\Fonts\cordiauz.ttf|0|utf-8|
cordiaz|Cordia New Bold Italic|1|C:\Windows\Fonts\cordiaz.ttf|0|utf-8|
cour|Courier New Regular|1|C:\Windows\Fonts\cour.ttf|0|utf-8|
courbd|Courier New Bold|1|C:\Windows\Fonts\courbd.ttf|0|utf-8|
courbi|Courier New Bold Italic|1|C:\Windows\Fonts\courbi.ttf|0|utf-8|
couri|Courier New Italic|1|C:\Windows\Fonts\couri.ttf|0|utf-8|
[...]

in (2) only the font acronym is displayed.

maybe the nice dialog of (1) could be added to (2)?

maybe it's also possible to add a font selection dialog to e.g. the d.vect font=string option?

Attachments (3)

fontselection_appearance.png (180.2 KB ) - added by hellik 10 years ago.
fontselection_mapdisplay.png (130.7 KB ) - added by hellik 10 years ago.
fontselection_dvect.png (46.3 KB ) - added by hellik 10 years ago.

Download all attachments as: .zip

Change History (10)

by hellik, 10 years ago

by hellik, 10 years ago

by hellik, 10 years ago

Attachment: fontselection_dvect.png added

comment:1 by annakrat, 10 years ago

I would definitely agree, I just don't understand where d.fontlist takes the fonts and if they are always the same as in the other dialog.

in reply to:  1 comment:2 by hellik, 10 years ago

Replying to annakrat:

I would definitely agree, I just don't understand where d.fontlist takes the fonts

probably from this file C:\OSGeo4W\apps\grass\grass-7.1.svn\etc\fontcap

in reply to:  1 comment:3 by glynn, 10 years ago

Replying to annakrat:

I would definitely agree, I just don't understand where d.fontlist takes the fonts

d.fontlist gets the list via D_font_list(), which calls COM_Font_list(), which first reads the fonts from the file specified by $GRASS_FONT_CAP (falling back to $GISBASE/etc/fontcap), then adds any fonts obtained by the driver's Font_list method if provided (currently, only the cairo driver implements this method).

comment:4 by martinl, 9 years ago

Milestone: 7.0.07.0.5

comment:5 by martinl, 8 years ago

Milestone: 7.0.57.3.0

comment:6 by martinl, 8 years ago

Milestone: 7.3.07.4.0

Milestone renamed

comment:7 by wenzeslaus, 8 years ago

Keywords: dialog selection d.font d.fontlist fontcap added
Milestone: 7.4.07.2.1
Resolution: fixed
Status: newclosed

The Map Display tab and d.vect now have selection similar to what Map Display tab had before but with life preview of the font as rendered by GRASS GIS. I'm closing this as fixed. Done in r68713 and r68757. Available in 7.2.0.

Note: See TracTickets for help on using tickets.