Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
01-02-2014, 03:35 AM
|
#1
|
Member
Registered: Sep 2012
Posts: 372
Rep: 
|
Box draw characters
I hate to write this cuz its been nearly done before. But...
99% of what I do does not required the old DOS box drawing characters but when I need them wham!# I need them.
1) is there a way to load/unload these characters on the fly?
2) if not, is there a ""simple"" way to replace some font like DINGBATS or the like with these box and shade characters preferably with a shell script?
|
|
|
01-02-2014, 09:17 AM
|
#2
|
Member
Registered: Oct 2008
Location: Poland, Łódź
Distribution: Lubuntu, Salix
Posts: 105
Rep:
|
|
|
|
01-02-2014, 06:09 PM
|
#3
|
Member
Registered: Sep 2012
Posts: 372
Original Poster
Rep: 
|
OK what about it, is it a typical install of a font and does it have the box characters? I am font sensitive and averse.
What I would like is to modify an existing font DING BATS with bit mapped characters that I could design and replace until say DingBats package is re-installed or until the originals I had saved replaces the ones I created. I also learned that it is possible to modify the UTF codes to create icon-like images and that could be useful.
I understand that the following is the correct procedure for font installation. Can U confirm this for me?
move new font(s) (*.ttf) to "/usr/share/fonts/TTF"
run these commands in "/usr/share/fonts"
bash-4.1# mkfontscale
bash-4.1# mkfontdir
bash-4.1# fc-cache -f -v
|
|
|
01-03-2014, 12:55 PM
|
#5
|
Senior Member
Registered: May 2012
Location: Sebastopol, CA
Distribution: Slackware64
Posts: 1,039
|
Quote:
Originally Posted by waddles
OK what about it, is it a typical install of a font
|
Yes, UTF-8 support is fairly ubiquitous today.
Quote:
and does it have the box characters?
|
Yes, if you'd clicked on his link, you'd have seen UTF-8's box character mappings.
|
|
1 members found this post helpful.
|
01-03-2014, 03:13 PM
|
#6
|
LQ Addict
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,302
Rep: 
|
You don't say if you want a font for X or for the console. As a reminder, for the console there's nothing to do besides installing the font if need be (zero configuration). And under X, inputing a character of which you know the UTF-8 code is usallly fairly easy: hold Ctrl+Shift, press u (an underlined u should appear), release these keys and type the four hex digits of the UTF-8 code then press [Enter]. This works with most text editors, including LQ's post editor 
Exxamples:
U+2580 ▀
U+2584 ▄
U+259B ▛
TIP: you don't even have to hold "Shift" to type the digits even if on your keyboard you usually need to do that to input decimal digits.
|
|
1 members found this post helpful.
|
01-03-2014, 10:22 PM
|
#7
|
Member
Registered: Sep 2012
Posts: 372
Original Poster
Rep: 
|
My appologies to ttk & witek. When I see a font description my mind just flips I have been so confused by past experiences I really force myself to deal with them.
Didier, UR a mind saver that is precisely what I needed. When I saw it I recalled I had done that b4 but could not dredge it up mentally in any way or shape or search for it cuz I was so clueless. Thanx in spades!
U C what happens, I go into psyco shock when fonts come up. Seriously need to get over it.
I presume that the method I showed in #3 is for non-console fonts i.e printer.
But am a bit confused because the "console" fonts are in /usr/share/kbd/consolefonts and I find the font there which I use to define the font used for terminals as shown in: Menue > System > Terminal (the terminal I usually do my work in ), which I have been thinking is an x-terminal not a console. Is this correct?
Oops! After trying Didier's method in my terminal and in my usual vim editor found that it didn't work. No underlined u. Tried number from keyboard and keypad same result. Does this mean this is not an x window? What kind of window is it then if not console and not x-window?
I guess that UTF-8 is not installed by default as I do not see it anywhere under /usr/share/kbd or /usr/share/fonts. Where should it be ?
Last edited by waddles; 01-03-2014 at 10:59 PM.
|
|
|
01-04-2014, 12:36 PM
|
#8
|
LQ Addict
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,302
Rep: 
|
<rant>
I suggest you do this next time:
- launch your favorite Internet browser
- either in your favorite search engine or in the search field of your browser, type: "input utf-8 code vim" (without the quotation marks)
- look at the results and try what you found
</rant>
Now for the answer to "how-to input UTF-8 codes in vim":
- press and hold together Ctrl+v => this should display a circumflex accent ^
- release these two keys
- press u
- type the four hexadecimal digits
- you should see the good glyph (no need to press [Enter] with this input method)
In this case the TIP in my previous post doesn't work but this put aside the method works, I just checked.
PS I am not a vim user.
PPS the Linux console has been UTF-8 able by default since a lot of time, but if you have this line:
Code:
append=" vt.default_utf8=0"
in /etc/lilo.conf, delete it or comment it out then re-run lilo.
Code:
bash-4.2$ grep -A 6 default_utf8 /usr/src/linux/Documentation/kernel-parameters.txt
vt.default_utf8=
[VT]
Format=<0|1>
Set system-wide default UTF-8 mode for all tty's.
Default is 1, i.e. UTF-8 mode is enabled for all
newly opened terminals.
bash-4.2$
Last edited by Didier Spaier; 01-04-2014 at 12:41 PM.
|
|
|
01-04-2014, 10:41 PM
|
#9
|
Member
Registered: Aug 2010
Posts: 353
Rep: 
|
@waddles
Dear Sir - I do not understand why you are so stuck on wanting to enter utf-8 codes etc. just to get a box on your screen. I try, but I can't.
I would like to advise you, to instead focus on the job at hand, and use the right tools that will draw a box for you on your screen.
For shell scripts, use the dialog tool. It makes boxes and much more. It's already installed on Slackware - "man dialog".
If you want to draw boxes in VIm (for example in your C program), use the DrawIt plugin. But then - ncurses might be the better tool in that case.
Look for the right tool to get the job done. It will save you a lot of time.
Hope this helps.
|
|
|
01-05-2014, 03:49 AM
|
#10
|
Member
Registered: Sep 2012
Posts: 372
Original Poster
Rep: 
|
Didier: U were correct re the lilo command but changing that only has allowed me to obtain the underlined u. I tried lilo and reboot and still the same.
In the interest of civility I am concluding the query here it was not my intent to bring down so much disgruntlement.
|
|
|
All times are GMT -5. The time now is 05:19 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|