Showing posts with label font. Show all posts
Showing posts with label font. Show all posts

2008-06-25

Firefox fonts

Its huge subject, including font rendering in system (in my case its Xorg in Ubuntu). It starts from font installing, the topic I found quite though. I try to update this post from time to time.

Font families and sizes


In Firefox I still have problems with font sizes and many times, when I change font properties in Edit -> Preferences I get a mess on some web pages.
To unify all setiings without crawling thru all properties, I close Firefox, open preferences file, for exampl
e

~/.mozilla/firefox/w6mr5ny9.default/prefs.js

where only the profile name (w6mr5ny9.default) can be confusing, and I change all settings according to my nee
ds. By now its:

user_pref("font.language.group", "x-western");
user_pref("font.minimum-size.x-central-euro", 12);
user_pref("font.minimum-size.x-unicode", 12);
user_pref("font.minimum-size.x-user-def", 12);
user_pref("font.minimum-size.x-western", 12);
user_pref("font.name.monospace.x-central-euro", "Inconsolata");
user_pref("font.name.monospace.x-unicode", "Inconsolata");
user_pref("font.name.monospace.x-user-def", "Inconsolata");
user_pref("font.name.monospace.x-western", "Inconsolata");
user_pref("font.name.sans-serif.x-central-euro", "DejaVu Sans");
user_pref("font.name.sans-serif.x-unicode", "DejaVu Sans");
user_pref("font.name.sans-serif.x-user-def", "DejaVu Sans");
user_pref("font.name.sans-serif.x-western", "DejaVu Sans");
user_pref("font.name.serif.x-central-euro", "DejaVu Serif");
user_pref("font.name.serif.x-unicode", "DejaVu Serif");
user_pref("font.name.serif.x-user-def", "DejaVu Serif");
user_pref("font.name.serif.x-western", "DejaVu Serif");
user_pref("font.size.fixed.x-central-euro", 16);
user_pref("font.size.fixed.x-unicode", 16);
user_pref("font.size.fixed.x-user-def", 16);
user_pref("font.size.fixed.x-western", 16);


I always try to set the same font name and size for all 4 language groups I use (Central European, Unicode, Western and User Defined).

Its possible to change it on about:config page directly in Firefox.

The other problem in Firefox is its lack of connection to systems font settings. Firefox doesn't antialiases fonts even its set in system. To turn it on create ~/.fonts.conf:

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<match target="font" >
<edit mode="assign" name="autohint" >
<bool>true</bool>
</edit>
</match>
<match target="font" >
<edit mode="assign" name="rgba" >
<const>none</const>
</edit>
</match>
<match target="font" >
<edit mode="assign" name="hinting" >
<bool>false</bool>
</edit>
</match>
<match target="font" >
<edit mode="assign" name="hintstyle" >
<const>hintnone</const>
</edit>
</match>
<match target="font" >
<edit mode="assign" name="antialias" >
<bool>true</bool>
</edit>
</match>
</fontconfig>

2008-06-09

Font substitution in X Windows

The font technology incorporated in graphics systems (MS Windows, X Windows, printing) is really complicated. As George Williams, FontForge creator, mentioned in an interview, he wasn't concious of all purposes of OpenType features (the fragment about Arabic characters in OpenType).

That is why I'm not surprised how though is to configure fonts in Linux properly. But I found a nice guide on Ubuntu Forum, which can be a how-to for all X Windows systems: HOWTO: Hoary ClearType-like fonts. Don't be confused - you can modify the guide according to your personal preferences, and you don't need to copy MS Windows behavior on your desktop :-)

Here is my ~/.fonts.conf:
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<match target="font">
  <test compare="more" name="pixelsize" qual="any">
   <double>12</double>
  </test>
  <edit name="autohint" mode="assign" >
   <bool>true</bool>
  </edit>
</match>
<match target="pattern">
  <test qual="any" name="family">
   <string>Arial</string>
  </test>
  <edit name="family" mode="assign">
   <string>DejaVu Sans Condensed</string>
  </edit>
</match>
<match target="pattern">   <test qual="any" name="family">    <string>Helvetica</string>   </test>   <edit name="family" mode="assign">    <string>DejaVu Sans Condensed</string>
  </edit>
</match>
<match target="pattern">
  <test qual="any" name="family">
   <string>sans-serif</string>
  </test>
  <edit name="family" mode="assign">
   <string>DejaVu Sans Condensed</string>
  </edit>
</match>
<match target="pattern">
  <test qual="any" name="family">
   <string>Times</string>
  </test>
  <edit name="family" mode="assign">
   <string>AntykwaTorunska</string>
  </edit>
</match>
<match target="pattern">
  <test qual="any" name="family">
   <string>serif</string>
  </test>
  <edit name="family" mode="assign">
   <string>AntykwaTorunska</string>
  </edit>
</match>
<match target="pattern">
  <test qual="any" name="family">
   <string>monospaced</string>
  </test>
  <edit name="family" mode="assign">
   <string>Inconsolata</string>
  </edit>
</match>
<match target="pattern">
  <test qual="any" name="family">
   <string>Courier</string>
  </test>
  <edit name="family" mode="assign">
   <string>Inconsolata</string>
  </edit>
</match>
</fontconfig>


After this disposition, you won't see Arial any more. Even on font list in preferences window Arial is substituted to a font specified in your ~/.fonts.conf. And mplayer's subtitles also :-)

PS
Zygfryd Gardzielewski's Antykwa Toruńska from 1960:

2008-06-07

Fonts - accented glyph

Some tricks to build accented glyphs. Its a draft as I'm still investigating the best solution to make diacritics.

I am going to experiment with quite nice monospace font SV Basic Manual designed by Johan Winge. On his page you find what inspired him.

Accented font should be built from base glyph and accent (or any other element changing its meaning). In Polish its kreseczka (similarly to acute, but not the same) and ogonek. Kreseczka creates mollification, similar to ñ. Ogonek - only in "a" and "e" significantly changes sound of the vowel, e.g. 'a' with ogonek sounds like the letter between 'm' and 'b' in word 'mobile'. Without it its as 'a' in 'farm' or 'ham'.

I use FontForge. To build diacritics its necessary to not mix contours and references. Contour is a closed line drawn in place. Reference is a kind of link to another glyph. To create new accented font copy reference to base glyph (<Ctrl+G>), and paste into place designed for that accented glyph in the glyph array. Then go to accent and create appropriate diacritics. To find proper place for it choose View -> Go to(<Ctrl+Shift+>>) and type 'acute' or 'ogonek' or whichever accent you are looking for. Unfortunately FontForge doesn't know kreseczka.

Sometimes its necessary to change shape of acute to create kreseczka,. It means its not possible to create glyphs with kreseczka automatically. During automatic accents build (an automatic process provided by FontForge) ogonek is also entered in wrong place.

TrueType fonts require "instructions" - it can be added automatically in Hints -> Autoinstr

Font with incomplete set of accented glyphs



SV Basic Manual by Johan Winge


Glyph "E"


Glyph "ogonek"

When you have all components ready to use, copy references to it - one by one - and paste to proper place for your new glyph. Then Save and Export Font. Voila!


Glyph "Eogonek"

2008-06-03

Pool



Results are here

Proggy




Lucida




Inoculata




FreeMono




Fixed




Courier




Anonymous




SV Basic




Consolas




Update 2008-06-25
I found similar topic covering the same subject different way. Very useful.

2008-06-01

Your own font

After short investigation I found only one Open Source application to prepare fonts - FontForge. They have very good manual which can lead you into the world of typography. They also link to very interesting Adam Twardoch's site about diacritic signs in Polish fonts. If you enjoy fonts, you will find the figures simply beautiful.
.
If you plan to make a new font, you will fence with a license problem. The first trace of license I could accept was SIL's OFL (Summer Institute of Linguistics' Open Font License). FSF states on their GNU licenses list, that the license requires a program to be distributed with the fon, even its a "Hello World" program. I read this license and I didn't find there anything like this (the license text is short and pretty simple), but I chose for my imaginary font (I created a half of letter 'C' :-)) GNU license with the recommended exception. I thought FSF mentioned OSF 1.0, but they are clear, that they are describing version 1.1.


PS
Short PDF document about digitising of Polish font from 1960 - Antykwa Toruńska. Tree years to first pretty complete version, and another tree to complete the set with more faces then the original :-)

PPS
How to install fonts in Debian/Ubuntu.

2008-05-31

Utility graphics

Last web surfing conducted me to much better source of fresh news. And no, its not digg.com. Its Delicious. As the name suggests, its pretty good set of links about fresh topics. Wandering from link to link I eventually landed on graphics site. A surprising simplicity and correlation of elements I couldn't match provoked me to do some my own attempts.






Update 2008-06-25
Its not possible to learn on somebody else mistakes. We can learn only on our own. That why there no step-by-step guide how to create something requiring creativity. Have a vision and use proper tools. But as a general guide I could use this Jacci Bear's tutorial from about.com.