You are not logged in.

#1 2011-10-29 09:07:16

stlarch
Member
From: hell
Registered: 2010-12-25
Posts: 1,265

tamsynmod font

I added a bunch of status icons and a few other symbols to the excellent tamsyn font, 8x15 (with bold) and renamed it tamsynmod. It's in the aur https://aur.archlinux.org/packages.php?ID=53507 . It's just about perfect for my netbook screen. I made a similar font a while back called terminusmod. I like it and it works good in the terminal and dwm but didn't work in Awesome, gtk, etc. I decided to take another look at it and try to figure it out and basically what was happening is that I used bdfedit to draw the icons (because I can't figure out how to draw them in gbdfed), and it wasn't retaining all of the original characteristics of the font. On tamsynmod, I still drew the icons with bdfedit and then cut and pasted them into tamsyn with gbdfed and it seems to work fine now. Tamsynmod should work in Awesome, etc. now. I'll try to add some more sizes to tamsynmod and fix terminusmod in the next week or two. Here's a few screenshots.

tYjB4Mw   tYjB4NA   tYjB4NQ

Last edited by stlarch (2011-10-29 09:11:09)

Offline

#2 2011-10-29 10:30:55

lolilolicon
Member
Registered: 2009-03-05
Posts: 1,722

Re: tamsynmod font

Nice job.
Only problem I see, you seem to put the special symbols in the range of U+00A0 ~ U+00FF, but most of them are assigned characters in Unicode. This is not desirable, since characters in this range are widely used « such as U+00AB and U+00BB wink »

Does Unicode define some range specially for "custom symbols", where it is guaranteed that no defined characters will ever be? If we could use only those "not a character" code points for our custom symbols, there would be no conflicts, which would be nice.

Last edited by lolilolicon (2011-12-17 12:21:57)


This silver ladybug at line 28...

Offline

#3 2011-10-29 15:52:11

stlarch
Member
From: hell
Registered: 2010-12-25
Posts: 1,265

Re: tamsynmod font

Hi lolilolicon. Tamsyn only contains the basic set of ascii characters for now. I'm not sure if you can use anything beyond 0xFF, which would be ideal. I'll play around with it when I have some time and see if I can figure any more out about it.

Offline

#4 2011-11-20 01:32:05

sunaku
Member
From: /dev/tty
Registered: 2010-09-29
Posts: 140
Website

Re: tamsynmod font

The icons in this font look and function beautifully, thank you! big_smile

Offline

#5 2011-11-21 10:10:13

stlarch
Member
From: hell
Registered: 2010-12-25
Posts: 1,265

Re: tamsynmod font

sunaku wrote:

The icons in this font look and function beautifully, thank you!

Thanks, glad you like it.

sunaku wrote:

Here's a useful trick I discovered while making my DWM statusbar script:

If you're using @stlarch's Tamsynmod font and also want to use some Unicode symbols that the default "fixed" font supports, then specify both fonts in your DWM font definition:

static const char font[]            = "-*-tamsynmod-medium-r-*-*-14-*-*-*-*-*-*-*"
                                      ","
                                      "-*-fixed-medium-r-*-*-14-*-*-*-*-*-*-*";

Cheers.

Offline

I thought I would add this for informational purposes.

Offline

#6 2011-11-24 03:50:39

stlarch
Member
From: hell
Registered: 2010-12-25
Posts: 1,265

Re: tamsynmod font

I added the 7x12 and 7x14 and made a few other improvements. I'll probably do the 8x17 and 6x11 too soon.

Last edited by stlarch (2011-11-24 18:52:20)

Offline

#7 2011-11-24 18:51:57

stlarch
Member
From: hell
Registered: 2010-12-25
Posts: 1,265

Re: tamsynmod font

Got the 6x11 done and updated the aur.

Offline

#8 2011-11-26 02:24:12

sunaku
Member
From: /dev/tty
Registered: 2010-09-29
Posts: 140
Website

Re: tamsynmod font

Hey stlarch, did you change the glyph codes in the latest update?  A few of the glyphs I use in my DWM config now appear as boxes.  Could you post a new screenshot with the glyph codes?  Thanks.

Offline

#9 2011-11-26 02:46:36

sunaku
Member
From: /dev/tty
Registered: 2010-09-29
Posts: 140
Website

Re: tamsynmod font

Oh I see now, the 8x15r font has all the symbols, whereas the newer ones lack some.  I used FontForge to open up the PCF files directly, since I couldn't install pcf2bdf from AUR successfully.

Offline

#10 2011-11-29 05:36:22

stlarch
Member
From: hell
Registered: 2010-12-25
Posts: 1,265

Re: tamsynmod font

Hi sunaku. I finished up the 8x17, cleaned up some things and added a couple more icons. The smaller sizes don't have all of the icons that the 15 and 17 have. There just isn't enough space. I'll see what I can do.

Offline

#11 2011-12-10 20:20:16

stlarch
Member
From: hell
Registered: 2010-12-25
Posts: 1,265

Re: tamsynmod font

I added more icons and tried to clean up a couple of the existing ones. I updated the aur. Here's some screenshots of the 11, 12, 14 and 15 (17 is the same as 15):
tYm9oMg   tYm9oNA    tYm9oNQ    tYm9oNg

If you want to modify or add something else, it's pretty easy to do with gbdfed. Thanks to OK100's patch, you can now draw with it. Here's a link to a brief explanation of how to do it:  https://bbs.archlinux.org/viewtopic.php?id=92895

Offline

#12 2011-12-16 06:23:12

stlarch
Member
From: hell
Registered: 2010-12-25
Posts: 1,265

Re: tamsynmod font

I updated it again. I did some smaller ones and tried to do a variety of everything I could come up with. I got rid of the dice on the 15 and 17 and made some other changes. I aligned everything to the right to keep it more uniform. You may have to update your scripts. Each size turned out a little different. I did the best I could with them. Here's some screenshots of each size for reference (the screenshots are of termsyn, but they are the same):

tYnJoNQ    tYnJmYQ    tYnJmYg   tYnJmYw    tYnJmZA

Last edited by stlarch (2011-12-16 08:42:47)

Offline

#13 2011-12-17 05:38:33

sunaku
Member
From: /dev/tty
Registered: 2010-09-29
Posts: 140
Website

Re: tamsynmod font

Very nice @stlarch!  I have only one suggestion: since we have to use Unicode to address these glyphs anyway, why not put them in the Private Use Area blocks instead of having them conflict with the Extended Latin charset?

Last edited by sunaku (2011-12-17 05:38:51)

Offline

#14 2011-12-17 19:16:54

stlarch
Member
From: hell
Registered: 2010-12-25
Posts: 1,265

Re: tamsynmod font

Hey. It sounds good to me. Let me look into it and see what I can do.

Offline

#15 2011-12-17 19:31:16

sunaku
Member
From: /dev/tty
Registered: 2010-09-29
Posts: 140
Website

Re: tamsynmod font

I was experimenting with that idea this morning and I created two fonts called "stlarch" that only contain your status icons in the E000-F8FF private use area: stlarch-14.bdf and stlarch-16.bdf.

I'm able to use these fonts in DWM as follows:

static const char font[]            =
"-*-stlarch-*-*-*-*-16-*-*-*-*-*-*-*"
","
"-*-fixed-medium-r-*-*-14-*-*-*-*-*-*-*"
;

Now, the stlarch font serves up the status icons from its private use range, and the fixed font serves up all other characters (which of course are not found in the stlarch font).  Cheers big_smile

Offline

#16 2011-12-18 07:49:40

stlarch
Member
From: hell
Registered: 2010-12-25
Posts: 1,265

Re: tamsynmod font

^^Ahh, I see. Awesome. Maybe I'll include something like the ones you made in the future. Thank you.^^

Offline

#17 2011-12-24 23:10:42

steve___
Member
Registered: 2008-02-24
Posts: 452

Re: tamsynmod font

sunaku wrote:

I was experimenting with that idea this morning and I created two fonts called "stlarch" that only contain your status icons in the E000-F8FF private use area: stlarch-14.bdf and stlarch-16.bdf.

I'm able to use these fonts in DWM as follows:

static const char font[]            =
"-*-stlarch-*-*-*-*-16-*-*-*-*-*-*-*"
","
"-*-fixed-medium-r-*-*-14-*-*-*-*-*-*-*"
;

Now, the stlarch font serves up the status icons from its private use range, and the fixed font serves up all other characters (which of course are not found in the stlarch font).  Cheers big_smile

How does one test with the stlarch font?  After installing it I tired running urxvt like:

 $ urxvt -fn "-*-stlarch-*-*-*-*-16-*-*-*-*-*-*-*"

Then in that term I tired:

 $ echo -e "\xE000" 

But wasn't able to see the icons, what am I missing?

Offline

#18 2011-12-25 02:40:18

sunaku
Member
From: /dev/tty
Registered: 2010-09-29
Posts: 140
Website

Re: tamsynmod font

On my system:

> xlsfonts | grep stlarch
-misc-stlarch-medium-r-normal--0-0-100-100-c-0-iso10646-1
-misc-stlarch-medium-r-normal--14-120-100-100-c-100-iso10646-1
-misc-stlarch-medium-r-normal--16-140-100-100-c-80-iso10646-1

> grep stlarch ~/.fonts/fonts.dir
stlarch-14.bdf -misc-stlarch-medium-r-normal--14-120-100-100-c-100-iso10646-1
stlarch-16.bdf -misc-stlarch-medium-r-normal--16-140-100-100-c-80-iso10646-1

> ls ~/.fonts/stlarch*bdf
/home/sunny/.fonts/stlarch-14.bdf
/home/sunny/.fonts/stlarch-16.bdf

> xset q | grep -A1 Font
Font Path:
  /home/sunny/.fonts,/usr/share/fonts/misc/,/usr/share/fonts/TTF/,/usr/share/fonts/Type1/,/usr/share/fonts/100dpi/,/usr/share/fonts/75dpi/,built-ins

Perhaps the font wasn't installed correctly on your system?

Edit:  I see now, I didn't give any installation instructions.  Do this:

Download the fonts to your ~/.fonts directory and run:

mkfontdir ~/.fonts
xset +fp ~/.fonts
xset fp rehash

Now, any new applications you launch can use them.

Last edited by sunaku (2011-12-25 02:42:36)

Offline

#19 2011-12-25 02:48:39

steve___
Member
Registered: 2008-02-24
Posts: 452

Re: tamsynmod font

This is what I have as well.  Did you try my test above using urxvt -fn and echo -e "\xE000" ?

Offline

#20 2011-12-25 07:25:34

sunaku
Member
From: /dev/tty
Registered: 2010-09-29
Posts: 140
Website

Re: tamsynmod font

Yes, and this is what I see:

tYndscQ

Plus all this output in the terminal where I ran urxt:

> urxvt -fn "-*-stlarch-*-*-*-*-16-*-*-*-*-*-*-*"
urxvt: unable to calculate font width for ':slant=0:weight=100:pixelsize=16:minspace=True:lang=ru', ignoring.
urxvt: unable to calculate font width for ':slant=0:weight=100:pixelsize=16:minspace=True:lang=ru', ignoring.
urxvt: unable to calculate font width for ':slant=0:weight=100:pixelsize=16:minspace=True:lang=ar', ignoring.
urxvt: unable to calculate font width for ':slant=0:weight=100:pixelsize=16:minspace=True:lang=el', ignoring.
urxvt: unable to calculate font width for ':slant=0:weight=100:pixelsize=16:minspace=True:lang=he', ignoring.
urxvt: unable to calculate font width for ':slant=0:weight=100:pixelsize=16:minspace=True:lang=tr', ignoring.
urxvt: unable to calculate font width for ':slant=0:weight=100:pixelsize=16:minspace=True:lang=se', ignoring.
urxvt: unable to calculate font width for ':slant=0:weight=100:pixelsize=16:minspace=True:lang=th', ignoring.
urxvt: unable to calculate font width for 'AR PL KaitiM GB:slant=0:weight=100:pixelsize=16:minspace=True', ignoring.
urxvt: unable to calculate font width for 'AR PL SungtiL GB:slant=0:weight=100:pixelsize=16:minspace=True', ignoring.
urxvt: unable to calculate font width for ':slant=0:weight=100:pixelsize=16:minspace=True:lang=zh', ignoring.
urxvt: unable to calculate font width for 'AR PL Mingti2L Big5:slant=0:weight=100:pixelsize=16:minspace=True', ignoring.
urxvt: unable to calculate font width for 'AR PL KaitiM Big5:slant=0:weight=100:pixelsize=16:minspace=True', ignoring.
urxvt: unable to calculate font width for 'Bitstream Vera Sans Mono:slant=0:weight=100:pixelsize=16:antialias=False:autohint=True:minspace=True', ignoring.
urxvt: unable to calculate font width for 'Courier New:slant=0:weight=100:pixelsize=16:antialias=False:autohint=True:minspace=True', ignoring.
urxvt: unable to calculate font width for 'Andale Mono:slant=0:weight=100:pixelsize=16:antialias=False:autohint=False:minspace=True', ignoring.
urxvt: unable to calculate font width for 'Arial Unicode MS:slant=0:weight=100:pixelsize=16:antialias=False:autohint=False:minspace=True', ignoring.
urxvt: unable to calculate font width for 'FreeMono:slant=0:weight=100:pixelsize=16:autohint=True:minspace=True', ignoring.
urxvt: unable to calculate font width for ':slant=0:weight=200:pixelsize=16:minspace=True:lang=ru', ignoring.
urxvt: unable to calculate font width for ':slant=0:weight=200:pixelsize=16:minspace=True:lang=ru', ignoring.
urxvt: unable to calculate font width for ':slant=0:weight=200:pixelsize=16:minspace=True:lang=ar', ignoring.
urxvt: unable to calculate font width for ':slant=0:weight=200:pixelsize=16:minspace=True:lang=el', ignoring.
urxvt: unable to calculate font width for ':slant=0:weight=200:pixelsize=16:minspace=True:lang=he', ignoring.
urxvt: unable to calculate font width for ':slant=0:weight=200:pixelsize=16:minspace=True:lang=tr', ignoring.
urxvt: unable to calculate font width for ':slant=0:weight=200:pixelsize=16:minspace=True:lang=se', ignoring.
urxvt: unable to calculate font width for ':slant=0:weight=200:pixelsize=16:minspace=True:lang=th', ignoring.
urxvt: unable to calculate font width for 'AR PL KaitiM GB:slant=0:weight=200:pixelsize=16:minspace=True', ignoring.
urxvt: unable to calculate font width for 'AR PL SungtiL GB:slant=0:weight=200:pixelsize=16:minspace=True', ignoring.
urxvt: unable to calculate font width for ':slant=0:weight=200:pixelsize=16:minspace=True:lang=zh', ignoring.
urxvt: unable to calculate font width for 'AR PL Mingti2L Big5:slant=0:weight=200:pixelsize=16:minspace=True', ignoring.
urxvt: unable to calculate font width for 'AR PL KaitiM Big5:slant=0:weight=200:pixelsize=16:minspace=True', ignoring.
urxvt: unable to calculate font width for 'Bitstream Vera Sans Mono:slant=0:weight=200:pixelsize=16:antialias=False:autohint=True:minspace=True', ignoring.
urxvt: unable to calculate font width for 'Courier New:slant=0:weight=200:pixelsize=16:antialias=False:autohint=True:minspace=True', ignoring.
urxvt: unable to calculate font width for 'Andale Mono:slant=0:weight=200:pixelsize=16:antialias=False:autohint=False:minspace=True', ignoring.
urxvt: unable to calculate font width for 'Arial Unicode MS:slant=0:weight=200:pixelsize=16:antialias=False:autohint=False:minspace=True', ignoring.
urxvt: unable to calculate font width for 'FreeMono:slant=0:weight=200:pixelsize=16:autohint=True:minspace=True', ignoring.

Offline

#21 2011-12-25 13:55:30

steve___
Member
Registered: 2008-02-24
Posts: 452

Re: tamsynmod font

Yes this is what I am seeing.  How does one display the icons?  Do you have an example shell script you use with xsetroot?

Offline

#22 2011-12-25 23:37:42

sunaku
Member
From: /dev/tty
Registered: 2010-09-29
Posts: 140
Website

Re: tamsynmod font

I just emit the raw unicode chars into the config.h file for my tags and my layouts while setting my font appropriately.

My statusbar script uses dzen2, where I insert sm4tik's XBM status icons directly, so it doesn't use stlarch font.

Offline

#23 2011-12-27 17:13:28

steve___
Member
Registered: 2008-02-24
Posts: 452

Re: tamsynmod font

While using stlarch I was not able to get the icons to output from a bash script, so I decided to test with tamsyn.  I installed tamsyn-font 1.8-1.  To test I loaded the font with:

$ urxvt -fn "-misc-tamsyn-medium-r-normal-*-15-*-*-*-*-*-iso8859-*"

and ran

 $ for i in a{0..9}; do echo -e "${i}: \x$i"; done
a0:  
a1: ¡
a2: ¢
a3: £
a4: ¤
a5: ¥
a6: ¦
a7: §
a8: ¨
a9:

What am I missing?

Offline

#24 2011-12-27 17:57:55

sunaku
Member
From: /dev/tty
Registered: 2010-09-29
Posts: 140
Website

Re: tamsynmod font

The stlarch font only defines a few glyphs in the Unicode Private Use Area.  In short, it is useless by itself and must be combined with another font to give you BOTH icons and normal text.  In DWM, you can specify multiple X fonts separated by commas: X will look for the glyphs in the first font and if it doesn't find them, it moves on to the next font.  This way, stlarch will serve up its icon glyphs while the other combined font will serve up all other glyphs.

Offline

#25 2011-12-27 18:11:05

steve___
Member
Registered: 2008-02-24
Posts: 452

Re: tamsynmod font

I understand this.  As said, "I was not able to get the icons [from stlarch] to output from a bash script".  I use the output of the bash script with xsetroot to set the status bar in dwm.

@stlarch - I don't understand why my test doesn't work with tamsym, any ideas?

Last edited by steve___ (2011-12-27 18:12:50)

Offline

Board footer

Powered by FluxBB