LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-02-2014, 03:35 AM   #1
waddles
Member
 
Registered: Sep 2012
Posts: 372

Rep: Reputation: 1
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?
 
Old 01-02-2014, 09:17 AM   #2
witek
Member
 
Registered: Oct 2008
Location: Poland, Łódź
Distribution: Lubuntu, Salix
Posts: 105

Rep: Reputation: 19
What about standard utf8:
http://www.utf8-chartable.de/unicode....pl?start=9472
 
Old 01-02-2014, 06:09 PM   #3
waddles
Member
 
Registered: Sep 2012
Posts: 372

Original Poster
Rep: Reputation: 1
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
 
Old 01-02-2014, 11:03 PM   #4
MadMaverick9
Member
 
Registered: Aug 2010
Posts: 353
Blog Entries: 4

Rep: Reputation: Disabled
You didn't say what editor you are using. But if your editor of choice happens to be VIm, you can use the DrawIt plugin. Works nice. I just tried it.

http://www.vim.org/scripts/script.php?script_id=40
http://www.drchip.org/astronaut/vim/doc/DrawIt.txt.html
 
Old 01-03-2014, 12:55 PM   #5
ttk
Senior Member
 
Registered: May 2012
Location: Sebastopol, CA
Distribution: Slackware64
Posts: 1,039
Blog Entries: 27

Rep: Reputation: 1485Reputation: 1485Reputation: 1485Reputation: 1485Reputation: 1485Reputation: 1485Reputation: 1485Reputation: 1485Reputation: 1485Reputation: 1485
Quote:
Originally Posted by waddles View Post
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.
Old 01-03-2014, 03:13 PM   #6
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,302

Rep: Reputation: Disabled
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.
Old 01-03-2014, 10:22 PM   #7
waddles
Member
 
Registered: Sep 2012
Posts: 372

Original Poster
Rep: Reputation: 1
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.
 
Old 01-04-2014, 12:36 PM   #8
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,302

Rep: Reputation: Disabled
<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.
 
Old 01-04-2014, 10:41 PM   #9
MadMaverick9
Member
 
Registered: Aug 2010
Posts: 353
Blog Entries: 4

Rep: Reputation: Disabled
@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.
 
Old 01-05-2014, 03:49 AM   #10
waddles
Member
 
Registered: Sep 2012
Posts: 372

Original Poster
Rep: Reputation: 1
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
midnight commander shows funny characters when using terminal to ssh into ubuntu box sunbelt57 Linux - Newbie 1 11-27-2013 02:31 PM
LXer: Mastering Characters Sets in Linux (Weird Characters, part 2) LXer Syndicated Linux News 0 11-26-2009 12:30 AM
How to modify the names of files and replace characters with other characters or symb peter88 Linux - General 2 12-10-2006 04:05 AM
XHTML/CSS question: how to draw a curved box for a sidebar vharishankar General 5 08-04-2005 09:32 PM
Is there a Linux program that can draw box plots? Baryonic Being Linux - Software 1 02-12-2005 01:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 05:19 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration