Discussion:
[Inkscape-user] Font size in menus and dialogs and other things
Mario Streiber
2004-05-19 08:42:33 UTC
Permalink
Hi list,


I just built and installed inkscape-0.38.1 successfully on my SuSE
Linux 8.1 box. After a few initial problems importing graphics
created with sodipodi, at the moment the following issues remain:

1) The font size of menus and dialogs is very small.

Is there a way of changing it, e.g. to the default
size that other GTK apps use? If not (e.g. because
it is hardcoded), can someone point me to a location
in the code where I can change it?

2) It seems inkscape expects all strings (including
file names) to be UTF-8 encoded (although I do not
use a UTF-8 locale, but ***@euro. Thus file names
that contain german umlauts etc. cause trouble.
Setting G_BROKEN_FILENAME helped here but problems
with german umlauts in sodipodi graphics remain. (I
removed them by editing the svg files manually
before loading them into inkscape).

Is there a way for inkscape to use other than UTF
encoding?

3) With sodipodi I have added text elements to a drawing
which used a fixed width font and contained multiple
blanks to form a simple table. But inkscape prints
only one blank for any number of blanks in a row.

How can I enter text so that multiple blanks are
displayed between two words?


Thanks in advance
Mario
Trent Buck
2004-05-19 10:22:15 UTC
Permalink
Post by Mario Streiber
Hi list,
I just built and installed inkscape-0.38.1 successfully on my SuSE
Linux 8.1 box. After a few initial problems importing graphics
1) The font size of menus and dialogs is very small.
Is there a way of changing it, e.g. to the default
size that other GTK apps use? If not (e.g. because
it is hardcoded), can someone point me to a location
in the code where I can change it?
How are you changing font size for GTK? Note that GTK+1 and GTK+2
have independent settings. Also note that (on my machine) running a
GNOME program makes the font size instantly go small.

I use this
http://www.muhri.net/nav.php3?node=gts
to change font sizes for GTK+1 and GTK+2.

HTH
-trent
--
I'm having amnesia and deja vu at the same time.
I think I've forgotten this before.
Mario Streiber
2004-05-19 13:43:55 UTC
Permalink
Post by Trent Buck
Post by Mario Streiber
1) The font size of menus and dialogs is very small.
Is there a way of changing it, e.g. to the default
size that other GTK apps use? If not (e.g. because
it is hardcoded), can someone point me to a location
in the code where I can change it?
How are you changing font size for GTK? Note that GTK+1 and
GTK+2 have independent settings. Also note that (on my machine)
running a GNOME program makes the font size instantly go small.
Usually I work under KDE. Just for fun I started a Gnome Session and
there the inkscape menus and dialogues come up with a normal font
size. Back in KDE the inkscape menus are very tiny again.

(Indeed all other GTK programs I have are GTK+1 and they work well)
Post by Trent Buck
I use this
http://www.muhri.net/nav.php3?node=gts
to change font sizes for GTK+1 and GTK+2.
I tried it. When selecting a larger font, it will display the
current theme with this font, but after applying and exiting it has
no effect on newly started gtk2 apps. It writes a file named
~/.gtkrc-2.0 with the following lines:

style "user-font"
{
font_name="Adobe Helvetica 12"
}
widget_class "*" style "user-font"

Unfortunately this file is not read when I start inkscape (or any
other gtk2 app), as strace shows.

I found the following environment variable which seems to indicate
which GTK resource files to read:

GTK2_RC_FILES=/etc/gtk-2.0/gtkrc:/usr/share/themes/Geramik/gtk-2.0/gtkrc:~/.gtkrc-2.0-HighColor:~/.kde/share/config/gtkrc

I would like to add ~/.gtkrc-2.0 to that variable (besides cleaning
it up somewhat) but have no idea where it is set.

Any hints?


Thanks
Mario
Artemio
2004-05-19 13:52:27 UTC
Permalink
Post by Mario Streiber
Usually I work under KDE. Just for fun I started a Gnome Session and
there the inkscape menus and dialogues come up with a normal font
size. Back in KDE the inkscape menus are very tiny again.
(Indeed all other GTK programs I have are GTK+1 and they work well)
You may want to try this:
http://www.kde-look.org/content/show.php?content=9714

I have GTK-Qt installed, and gtk-qt theme set in my gtkrc, and all gtk apps
use the same fonts and font sizes as in KDE. Works perfectly.


Artemio.
--
KDEvibes ::: audio environment for KDE :::
http://artemio.net/projects/kdevibes
[local time 16:50:26 (GMT +3) 19 May 2004] [system uptime 1 hr 00 min]
Trent Buck
2004-05-19 14:09:29 UTC
Permalink
Post by Mario Streiber
Post by Trent Buck
http://www.muhri.net/nav.php3?node=gts
I tried it. When selecting a larger font, it will display the
current theme with this font, but after applying and exiting it has
no effect on newly started gtk2 apps. It writes a file named
Unfortunately this file is not read when I start inkscape (or any
other gtk2 app), as strace shows.
It sounds like KDE is messing about with how GTK2's behavior.

Since I don't run GNOME or KDE; the only Qt app I have is filelight,
I can't help there. Sorry.

-trent
Mario Streiber
2004-05-19 15:09:10 UTC
Permalink
Post by Trent Buck
Post by Mario Streiber
Post by Trent Buck
http://www.muhri.net/nav.php3?node=gts
I tried it. When selecting a larger font, it will display the
current theme with this font, but after applying and exiting it
has no effect on newly started gtk2 apps. It writes a file
Unfortunately this file is not read when I start inkscape (or
any other gtk2 app), as strace shows.
It sounds like KDE is messing about with how GTK2's behavior.
Since I don't run GNOME or KDE; the only Qt app I have is
filelight, I can't help there. Sorry.
As I wrote further down the env variable GTK2_RC_FILES determines
which config files to read. Meanwhile I found out that it is set in
the kde startup script /opt/kde3/bin/startkde (at least on SuSE). I
added $HOME/.gtkrc-2.0 there and it works now.

I also tried gtk-qt as Artemio suggested. But even with this theme
engine I had to specify a certain font and size in the gtkrc file.
And also, this is much slower on my not-so-fast system so I decided
not to use it.

Thanks anyway
Mario
bulia byak
2004-05-19 18:32:11 UTC
Permalink
Post by Mario Streiber
1) The font size of menus and dialogs is very small.
Is there a way of changing it, e.g. to the default
size that other GTK apps use? If not (e.g. because
it is hardcoded), can someone point me to a location
in the code where I can change it?
The only place where the font size is hard-coded is the top panel (under the
menu). The menu and the dialogs use standard font size. And on my system,
for example, the font size of Sodipodi 0.34 is noticeably smaller than that
of Inkscape. Gimp 2.0 has the same font size as Inkscape. So it's more
likely that Sodipodi decreases its global font size artificially (although I
don't know how, could anyone explain how this is possible?).
Post by Mario Streiber
2) It seems inkscape expects all strings (including
file names) to be UTF-8 encoded (although I do not
that contain german umlauts etc. cause trouble.
Should not happen. This was fixed long ago. Now we use the system locale
encoding for filenames. At least, KOI8-R filenames work for me.
Post by Mario Streiber
Setting G_BROKEN_FILENAME helped here but problems
with german umlauts in sodipodi graphics remain. (I
removed them by editing the svg files manually
before loading them into inkscape).
I think I know what you mean. Sodipodi (and early Inkscape) is broken in
that it stores the filenames inside the SVG file in sodipodi:docname
attribute, but does not recode them from the locale encoding to UTF-8.
However everything inside SVG must be in UTF-8 as specified by the XML
encoding declaration. Therefore these old files will cause trouble. Simply
remove the docname and docbase attributes to make them parse.
Post by Mario Streiber
3) With sodipodi I have added text elements to a drawing
which used a fixed width font and contained multiple
blanks to form a simple table. But inkscape prints
only one blank for any number of blanks in a row.
Check if the element has xml:space="preserve".
Post by Mario Streiber
How can I enter text so that multiple blanks are
displayed between two words?
They are, by default. New text objects are created with
xml:space="preserve". If this does not work for you, file a bug with example
files attached.

_________________________________________________________________
http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines
Mario Streiber
2004-05-19 20:56:46 UTC
Permalink
Post by bulia byak
Post by Mario Streiber
1) The font size of menus and dialogs is very small.
Is there a way of changing it, e.g. to the default
size that other GTK apps use? If not (e.g. because
it is hardcoded), can someone point me to a location
in the code where I can change it?
The only place where the font size is hard-coded is the top panel
(under the menu). The menu and the dialogs use standard font
size. And on my system, for example, the font size of Sodipodi
0.34 is noticeably smaller than that of Inkscape. Gimp 2.0 has
the same font size as Inkscape. So it's more likely that Sodipodi
decreases its global font size artificially (although I don't
know how, could anyone explain how this is possible?).
This is already solved by defining a default font and size in
~/.gtkrc-2.0. Also, per default this file is not parsed, I had to
add it to the GTK2_RC_FILES env variable.
Post by bulia byak
Post by Mario Streiber
2) It seems inkscape expects all strings (including
file names) to be UTF-8 encoded (although I do not
that contain german umlauts etc. cause trouble.
Should not happen. This was fixed long ago. Now we use the system
locale encoding for filenames. At least, KOI8-R filenames work
for me.
For me, the problem is still there with the CVS snapshot I checked
out today. Without any special setting I get messages on the
console like

Gtk-Message: The filename "anyname\366something" couldn't be
converted to UTF-8. (try setting the environment variable
G_FILENAME_ENCODING): Invalid byte sequence in conversion input

when changing to a directory which contains such filenames in the
file selection dialog. If I set G_FILENAME_ENCODING it gets even
worse. On startup I get lots of messages like

** (inkscape:30455): CRITICAL **: Unable to load stock
pixmap /opt/inkscape-cvs/share/inkscape/icons/zoom_out.xpm

and the GUI doesn't contain any icon then. I also realized that
setting G_BROKEN_FILENAME doesn't help with the version I have now.
Post by bulia byak
Post by Mario Streiber
Setting G_BROKEN_FILENAME helped here but problems
with german umlauts in sodipodi graphics remain. (I
removed them by editing the svg files manually
before loading them into inkscape).
I think I know what you mean. Sodipodi (and early Inkscape) is
broken in that it stores the filenames inside the SVG file in
sodipodi:docname attribute, but does not recode them from the
locale encoding to UTF-8. However everything inside SVG must be
in UTF-8 as specified by the XML encoding declaration. Therefore
these old files will cause trouble. Simply remove the docname and
docbase attributes to make them parse.
Yes that helped.
Post by bulia byak
Post by Mario Streiber
3) With sodipodi I have added text elements to a drawing
which used a fixed width font and contained multiple
blanks to form a simple table. But inkscape prints
only one blank for any number of blanks in a row.
Check if the element has xml:space="preserve".
Post by Mario Streiber
How can I enter text so that multiple blanks are
displayed between two words?
They are, by default. New text objects are created with
xml:space="preserve". If this does not work for you, file a bug
with example files attached.
This is OK now too.

Mario
bulia byak
2004-05-19 18:51:36 UTC
Permalink
Post by Mario Streiber
3) With sodipodi I have added text elements to a drawing
which used a fixed width font and contained multiple
blanks to form a simple table. But inkscape prints
only one blank for any number of blanks in a row.
I just tested this: created a file with multiple spaces in text in Sodipodi
0.34 and opened it in Inkscape. Works fine.

_________________________________________________________________
Add photos to your e-mail with MSN Premium. Get 2 months FREE*
http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines
bulia byak
2004-05-19 21:59:25 UTC
Permalink
Post by Mario Streiber
For me, the problem is still there with the CVS snapshot I checked
out today. Without any special setting I get messages on the
console like
Gtk-Message: The filename "anyname\366something" couldn't be
converted to UTF-8. (try setting the environment variable
G_FILENAME_ENCODING): Invalid byte sequence in conversion input
Looks like something is wrong with your locale. We use the standard glib
functions g_filename_{to/from}_utf8. Try non-ascii filenames with another
GTK program, such as Gimp, and see if it works for you.
Post by Mario Streiber
when changing to a directory which contains such filenames in the
file selection dialog. If I set G_FILENAME_ENCODING it gets even
worse. On startup I get lots of messages like
** (inkscape:30455): CRITICAL **: Unable to load stock
pixmap /opt/inkscape-cvs/share/inkscape/icons/zoom_out.xpm
Just do "make install".

_________________________________________________________________
STOP MORE SPAM with the MSN Premium and get 2 months FREE*
http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines
Mario Streiber
2004-05-22 09:27:57 UTC
Permalink
Post by bulia byak
Post by Mario Streiber
For me, the problem is still there with the CVS snapshot I
checked out today. Without any special setting I get messages
on the console like
Gtk-Message: The filename "anyname\366something" couldn't be
converted to UTF-8. (try setting the environment variable
G_FILENAME_ENCODING): Invalid byte sequence in conversion input
Looks like something is wrong with your locale. We use the
standard glib functions g_filename_{to/from}_utf8. Try non-ascii
filenames with another GTK program, such as Gimp, and see if it
works for you.
I tried several locales, including C, but it doesn't work anyway.

gimp works fine. It doesn't report any error for these files, and it
displays the files correctly in the file selection dialog, which
inkscape does not. But then, my gimp is a rather old version I
think (1.2.3), which does not use GTK+2. At the moment it seems
inkscape is the only app I have which uses GTK+2.
Post by bulia byak
Post by Mario Streiber
when changing to a directory which contains such filenames in
the file selection dialog. If I set G_FILENAME_ENCODING it gets
even worse. On startup I get lots of messages like
** (inkscape:30455): CRITICAL **: Unable to load stock
pixmap /opt/inkscape-cvs/share/inkscape/icons/zoom_out.xpm
Just do "make install".
I guess you think that the files are not there, but they are:

$ ll /opt/inkscape-cvs/share/inkscape/icons/zoom_out.xpm
-rw-r--r-- 1 root root 801 Feb 29
10:49 /opt/inkscape-cvs/share/inkscape/icons/zoom_out.xpm

I only get those errors if G_FILENAME_ENCODING is set.


Mario

Loading...