You are not logged in.

#1 2018-04-13 23:42:35

boscaiolo
Member
Registered: 2016-05-02
Posts: 19

SOLVED (yes, really!): how to get euro sign in a virtual terminal?

This sounds a trivial issue, but seems intractable. 

Xterm and Uxterm do not show the euro sign, though all the normal european accented characters are displayed correctly. I generally use either of these virtual terminals, as heavyweight terminals like gnome trap commands such as the Function keys used in mc, and they are ugly too. 

I installed urxvt to get full unicode support - including the euro sign - but urxvt somehow deletes underscore characters when a second line of code is directly beneath.  This makes it difficult to impossible to work.

I found various references to creating a ~/.Xresources file.  None exists by default on my box.  I use i3 or icewm, perhaps it is only the big wms that create an Xresources?

I found no good examples of .Xresources to copy and alter. Those I tried used exclamation marks to comment lines, but these lines raised errors, so I imagine the syntax has changed.

Can anyone point me to instructions on getting something as elegant as xterm to show the euro sign, or to one with working utf-8 support?

TIA

Last edited by boscaiolo (2018-04-15 15:24:05)

Offline

#2 2018-04-14 00:34:38

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: SOLVED (yes, really!): how to get euro sign in a virtual terminal?

Your issue with urxvt sounds like a broken prompt. Or you are forcing the term variable somewhere.

Don't randomly copy files from the internet and expect them to work. Use the wiki.

Check your locale and post any configs here.


Moving to NC...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2018-04-14 03:32:13

NoSuck
Member
Registered: 2015-03-04
Posts: 157
Website

Re: SOLVED (yes, really!): how to get euro sign in a virtual terminal?

Are you talking about € (U+20AC)?  Confirm the glyph is present in the font you have set for the XTerm*faceName resource.  The gucharmap package can help.  Make sure to check show only glyphs from this font under the view item of the main menu.

... perhaps it is only the big wms that create an Xresources?

No.

... I imagine the syntax has changed.

Hell no.

... they are ugly too.

I agree!

Offline

#4 2018-04-14 06:29:19

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,849

Re: SOLVED (yes, really!): how to get euro sign in a virtual terminal?

urxvt somehow deletes underscore characters when a second line of code is directly beneath

You either fumbled w/ the URxvt*lineSpace resource value or your used font has crap in its metrics descritptions.

Xterm and Uxterm do not show the euro sign

What *exactly* do they show instead? Feel free to upload a screenshot to imgur or so (don't post a huge image here, only a link or thumbnail)

Offline

#5 2018-04-14 08:33:38

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: SOLVED (yes, really!): how to get euro sign in a virtual terminal?

Works for me:
2018-04-14-092659_245x70_scrot.png

empty@Xanadu:~ $ grep font /home/empty/.Xdefaults  
URxvt.font:-*-dina-medium-r-*-*-10-*-*-*-*-*-*-*
empty@Xanadu:~ $

Both xterm & urxvt will parse ~/.Xdefaults automatically (if no X resources are already set); if you want to use ~/.Xresources then see https://wiki.archlinux.org/index.php/x_resources

EDIT: underscores work fine with that font, {line,letter}Space is unset.

Last edited by Head_on_a_Stick (2018-04-14 08:41:06)


Jin, Jîyan, Azadî

Offline

#6 2018-04-14 13:22:03

boscaiolo
Member
Registered: 2016-05-02
Posts: 19

Re: SOLVED (yes, really!): how to get euro sign in a virtual terminal?

Thanks jasonwryan, NoSuck, seth, Head_on_a_Stick.

Some locale and config:

~$ locale
LANG=fr_FR.UTF-8
LC_CTYPE="fr_FR.UTF-8"
LC_NUMERIC="fr_FR.UTF-8"
LC_TIME="fr_FR.UTF-8"
LC_COLLATE=C
LC_MONETARY="fr_FR.UTF-8"
LC_MESSAGES="fr_FR.UTF-8"
LC_PAPER="fr_FR.UTF-8"
LC_NAME="fr_FR.UTF-8"
LC_ADDRESS="fr_FR.UTF-8"
LC_TELEPHONE="fr_FR.UTF-8"
LC_MEASUREMENT="fr_FR.UTF-8"
LC_IDENTIFICATION="fr_FR.UTF-8"
LC_ALL=

/usr/share/X11/app-defaults$ cat XTerm
! $XTermId: XTerm.ad,v 1.102 2016/12/22 02:07:39 tom Exp $
...
*VT100.utf8Fonts.font2: -misc-fixed-medium-r-normal--8-80-75-75-c-50-iso10646-1
*VT100.utf8Fonts.font:  -misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso10646-1
*VT100.utf8Fonts.font3: -misc-fixed-medium-r-normal--14-130-75-75-c-70-iso10646-1
*VT100.utf8Fonts.font4: -misc-fixed-medium-r-normal--13-120-75-75-c-80-iso10646-1
*VT100.utf8Fonts.font5: -misc-fixed-medium-r-normal--18-120-100-100-c-90-iso10646-1
*VT100.utf8Fonts.font6: -misc-fixed-medium-r-normal--20-200-75-75-c-100-iso10646-1
...

/usr/share/X11/app-defaults$ cat UXTerm
...
*fontMenu.Label:  Unicode Fonts
*VT100.utf8:    1
...
*VT100.font2:   -misc-fixed-medium-r-normal--8-80-75-75-c-50-iso10646-1
*VT100.font:    -misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso10646-1
*VT100.font3:   -misc-fixed-medium-r-normal--14-130-75-75-c-70-iso10646-1
*VT100.font4:   -misc-fixed-medium-r-normal--13-120-75-75-c-80-iso10646-1
*VT100.font5:   -misc-fixed-medium-r-normal--18-120-100-100-c-90-iso10646-1
*VT100.font6:   -misc-fixed-medium-r-normal--20-200-75-75-c-100-iso10646-1
...

Yes, It seems to be € (U+20AC). In fact, the glyph seems to be present in all fonts that I inspected with gucharmap.  The font used by U/Xterm is a bitmap font, and much clearer than the TT font used by Urxvt.

After re-reading the archlinux wiki on Xresources, and looking at the config files again, I conclude that it should be possible to get the euro character with U/Xterm, which would be the best result for me.  But I still do not quite see how.

U/Xterm both show the empty dotted rectangle for the euro. Here are screenshots of that plus the disappearing underscore in Urxvt:  https://imgur.com/a/rRBq9 (Sorry for the cumbersome way of showing 3 tiny images, but BBtags for img do not seem to work)

I like Head_on_a_Stick's terminal font, btw -- nice and clear, and good numeral 1, l.c. l, pipe, with no ambiguity.

Last edited by boscaiolo (2018-04-14 13:22:58)

Offline

#7 2018-04-14 13:41:59

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,849

Re: SOLVED (yes, really!): how to get euro sign in a virtual terminal?

That's the font.

fc-match monospace
fc-list :mono

Try

xterm -fa "DejaVu Sans Mono"

- assuming DejaVu Sans Mono is available.

Offline

#8 2018-04-14 15:25:07

boscaiolo
Member
Registered: 2016-05-02
Posts: 19

Re: SOLVED (yes, really!): how to get euro sign in a virtual terminal?

Yes,

$ fc-match monospace
DejaVuSansMono.ttf: "DejaVu Sans Mono" "Book"

and 'fc-list :mono' gives a long list of fonts to try.

Starting xterm with  ' -fa "DejaVu Sans Mono" ' as you suggest, does basically solve the problem.  The type is huge; and even changing to 'small' is rather spread out and inconvenient to work with. I am trying various TT fonts, but I would still rather used a fixed font if there exists one with euro...

Thanks for the guidance.

Offline

#9 2018-04-14 15:51:29

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: SOLVED (yes, really!): how to get euro sign in a virtual terminal?

boscaiolo wrote:

The type is huge

Change the size then, see the man page fo details.

I would still rather used a fixed font if there exists one with euro

https://www.archlinux.org/packages/comm … dina-font/


Jin, Jîyan, Azadî

Offline

#10 2018-04-14 17:30:45

boscaiolo
Member
Registered: 2016-05-02
Posts: 19

Re: SOLVED (yes, really!): how to get euro sign in a virtual terminal?

Thanks to everyone for the help.  I will mark this SOLVED, though it is not really.

I find the following give acceptable results..

xterm -fa "dina" -fs 8 -fg white -bg black
xterm -fa Inconsolata\-dz -fs 9 -fg white -bg black
xterm -fa "DejaVu Sans Mono" -fs 9 -fg white -bg black

The TT fonts provide the euro sign in UXterm and Xterm. They are less clear because of antialiasing, I suppose, and I need the size larger to compensate.

The 'dina' is in some ways more elegant than the standard font, but it sets a lot wider and the numerals lack the satisfactory blockiness of the standard font.  These characteristics make code listing (with line numbers) look floppy.

I will probably revert to Xterm with standard fixed font and just manage without the euro character.  I can switch to truetype font or to urxvt when I need the euro.

There may be a better way, but I have wasted enough time on this!

Offline

#11 2018-04-14 19:11:16

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,849

Re: SOLVED (yes, really!): how to get euro sign in a virtual terminal?

https://wiki.archlinux.org/index.php/Fo … i-aliasing

My preferences on monospace fonts:
- Adobe Source Code Pro # there is exactly *one* thing that Adobe really can and that is fonts. Period.
- Consolas # Only purchased by MS ;-)
- Monaco # Old Apple Monospace
- Noto Sans Mono # Google

A real problem with monospace fonts tend to be that the width of bold and regular cuts is often not the same (what kills them for coding) - Monaco btw. simply has no bold variant (what makes it a questionable choice, but it's rounder and "friendlier" than any other monospace font)

You should btw. use X resources rather than parameters (while the latter are oc. "better" for testing purposes)

Offline

#12 2018-04-15 04:10:19

NoSuck
Member
Registered: 2015-03-04
Posts: 157
Website

Re: SOLVED (yes, really!): how to get euro sign in a virtual terminal?

boscaiolo wrote:

The TT fonts provide the euro sign in UXterm and Xterm. They are less clear because of antialiasing, I suppose, and I need the size larger to compensate.

For default XTerm, Ctrl + right click to disable "TrueType Fonts".  There is an X resource, as well.  Listen to seth:

You should btw. use X resources rather than parameters...

Offline

#13 2018-04-15 11:33:09

boscaiolo
Member
Registered: 2016-05-02
Posts: 19

Re: SOLVED (yes, really!): how to get euro sign in a virtual terminal?

@Seth, thanks.  I agree that Adobe Source Code Pro is an excellent face.

@NoSuck, thanks too.  Xterm menus are in fact not working because of the old problem I see many people have suffered over the years (though nobody has posted a solution that I can find.)

Warning: Cannot convert string "-adobe-helvetica-bold-r-normal--*-120 iso8859-*" to type FontStruct

I have also failed to find the meaning of the incantations -*-*-*-*-etc. in any man page, though I distinctly remember reading the details somewhere about ten years ago.
I could install aur/adobe-base-14-fonts but I note that aur/ephifonts-no-helvetica exists because "Helvetica messes up fonts in Firefox and Chromium", so I hesitate to try it.

Offline

#14 2018-04-15 12:16:42

NoSuck
Member
Registered: 2015-03-04
Posts: 157
Website

Re: SOLVED (yes, really!): how to get euro sign in a virtual terminal?

See if that error doesn't disappear using DejaVu Sans Mono, as before.

For font info, try man xfontsel.

Offline

#15 2018-04-15 13:05:10

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,648

Re: SOLVED (yes, really!): how to get euro sign in a virtual terminal?

boscaiolo wrote:

I have also failed to find the meaning of the incantations -*-*-*-*-etc. in any man page, though I distinctly remember reading the details somewhere about ten years ago.

https://wiki.archlinux.org/index.php/X_ … e_elements

Offline

#16 2018-04-15 14:11:31

boscaiolo
Member
Registered: 2016-05-02
Posts: 19

Re: SOLVED (yes, really!): how to get euro sign in a virtual terminal?

@2ManyDogs: That is just what I needed.

@NoSuck: The error is generated not by the main display font, but by the font it is looking for for the menus.  I do not know where this is configured - grepping the /etc/X11 subdirectories fails to find "adobe-helvetica". I do not see anthing else Xtermish in /etc so perhaps it is in /usr somewhere... Some of the time, the menus work, with a crude ugly default font and a warning message, and most of the time Xterm simply crashes and disappears with the same warning. I have no idea what triggers the two states.

EDIT: I have found it.  It is /usr/share/X11/app-defaults/XTerm:37:*SimpleMenu*menuLabel.font...
I will try adding an alternative in .Xresources.

2nd EDIT: Perhaps not.  It is the only match I found on the system to the error message

 Warning: Cannot convert string "-adobe-helvetica-bold-r-normal--*-120-*-*-*-*-iso8859-*" to type FontStruct 

but creating ~/.Xresources containing

 *SimpleMenu*menuLabel.font: "-misc-dejavu sans mono-medium-r-normal--0-90-*-*-m-*-*-*" 

and running 'xrdb -merge ~/.Xdefaults' does not solve the problem.

Last edited by boscaiolo (2018-04-15 14:54:13)

Offline

#17 2018-04-15 15:32:40

boscaiolo
Member
Registered: 2016-05-02
Posts: 19

Re: SOLVED (yes, really!): how to get euro sign in a virtual terminal?

Finally got to the bottom of this!

The .Xresources file entry for *SimpleMenu*menuLabel.font is competely irrelevant.

What was needed was to install the package 'xorg-fonts-misc' and restart X.  (I also installed 'xorg-fonts-100dpi', but I am guessing this was unnecessary.)

Now the menus are available and the euro sign is printed, even without using TT fonts.

SOLVED!  Thanks to all who helped.

Offline

Board footer

Powered by FluxBB