LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   change ghostview (gv) menu font size (https://www.linuxquestions.org/questions/linux-newbie-8/change-ghostview-gv-menu-font-size-834862/)

mike11 09-27-2010 10:11 PM

change ghostview (gv) menu font size
 
Hi All,

How to change the GV menu font size? (not the document font size which is set by scale). man and info don't mention anything about this.

Thanks,
Mike.

evo2 09-27-2010 11:33 PM

In your .Xdefaults (or .Xresources) you can set it with a line like:
Code:

gv*font: -*-helvetica-medium-r-normal--*-80-*-*-*-*-*-*
I think this is not documented specifically for gv since it is a standard resource for this type of Xt program.

Cheers,

Evo2.

mike11 09-28-2010 03:16 AM

Thanks evo2. Do you know if it's possible to modify the menu layout (normal and spartan mode)?. Is it possible to add or remove entries?.

evo2 09-28-2010 03:40 AM

From the man page it seems that --spartan just does --style=gv_spartan.dat. I looked for that file on my system and found it at /usr/share/gv/gv_spartan.dat. It looks like Xdefaults syntax so you may just be able to copy the contents of that file into your .Xdefaults to get the desired effect.

HTH,

Evo2.

mike11 09-28-2010 08:34 AM

Thanks Evo2.

kjhambrick 12-11-2021 09:26 AM

Resurrect an Ancient Thread about /usr/bin/gv Widget Fonts
 
All --

Sorry to resurrect this ancient thread but here goes ...

I am running current with the KDE Desktop on my new Laptop with a high-rez display ( 192 dpi / 3840 x 2160 )

I use /usr/bin/gv extensively for my job -- mostly to measure xy coordinates on PDF Pages.

The menus and widgets in /usr/bin/gv are so tiny that I can't read them.

I tried the solution above via the simple ~/.Xresources entry followed by `xrdb -merge ~/.Xresources`

I looked at the Slackware gv source and I found the file: source/gv-3.7.4/src/gv_font_res.dat

The Xresources are named with a capital GV like this:

Code:

GV*font: -*-Helvetica-Medium-R-Normal--*-140-*-*-P-*-ISO8859-1
I tried doubling the font size to 280 in my ~/.Xrsources and then ran `xrdb -merge ~/.Xresources`

Code:

GV*font: -*-Helvetica-Medium-R-Normal--*-280-*-*-P-*-ISO8859-1
No luck ...

Any ideas ?

Thanks !

-- kjh

teckk 12-11-2021 09:43 AM

I just happen to have gv installed.

Code:

gv --version
gv 3.7.4

If I launch it from term I get
Code:

gv
Warning: Cannot convert string "-*-Helvetica-Medium-R-Normal--*-140-*-*-P-*-ISO8859-1" to type FontStruct
Warning: Cannot convert string "-*-Helvetica-Medium-R-Normal--*-120-*-*-P-*-ISO8859-1" to type FontStruct
Warning: Cannot convert string "-*-Helvetica-Medium-R-Normal--*-100-*-*-P-*-ISO8859-1" to type FontStruct
Warning: Cannot convert string "-*-Helvetica-Bold-R-Normal--*-120-*-*-P-*-ISO8859-1" to type FontStruct

And it works ok, but the menu fonts are small.

So, in my ~/.Xdefaults I added:
Code:

gv*font: -*-fixed-medium-r-*-*-30-*-*-*-*-*-iso8859-*
And sure enough, that made gv menu fonts real large.

kjhambrick 12-11-2021 10:20 AM

Thanks teckk

I thought I was posting to the Slackware Forum so I neglected to say that I am running Slackware Current.

I tried your suggestion but no luck.

I'll keep looking

Thanks again.

-- kjh

shruggy 12-11-2021 10:56 AM

Quote:

Originally Posted by kjhambrick (Post 6308593)
The Xresources are named with a capital GV like this

In my experience, using the capital GV will only change the widget font, but won't affect the menu font. For that, you'll have to use gv.

Try
Code:

echo 'gv*font:12x24' >/tmp/gv.ad
gv -ad=/tmp/gv.ad


kjhambrick 12-11-2021 03:52 PM

Thanks for the info Shruggy

Your specific ad=FILE hint didn't work but your method of testing 'additional resources' lead me to the -style=FILE Arg

These args are certainly more convenient than messing with ~/.X{resources,defaults}

Thanks again.

-- kjh


All times are GMT -5. The time now is 02:38 PM.