Difference between revisions of "User:Thisoldman"

From ArchWiki
Jump to: navigation, search
m (Font Names)
m (Font Names)
Line 20: Line 20:
 
  -misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso8859-1
 
  -misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso8859-1
  
The name contains fourteen elements, each element field preceded by a hyphen, '-'.  Not all elements are required to be present in a font name and a field may be empty.  Names can be simplified for the user by the wildcards '*' and '?'.  Note that quotes are needed to prevent the shell from interpreting the wildcards and to avoid backslashing whitespace when a font name is used on the command-line.
+
The name contains fourteen elements, each element field preceded by a hyphen, '-'.  Not all elements are required to be present in a font name and a field may be empty.  Names can be simplified for the user by the wildcards '*' and '?'.  Note that quotes are needed to prevent the shell from interpreting the wildcards and to avoid backslashing whitespace when a font name is used on the command-line.  It is safest to make sure all fourteen fields are present, but sometimes concatenated fields do work with wildcards.
  
  $ xterm -fn "*-fixed-medium-r-s*-*-13-120-75-*-iso8859-1"
+
  $ xterm -fn "-*-fixed-medium-r-s*--12-87-*-*-*-*-iso10???-1"
 
  $ xterm -fn "-*-dejavu sans mono-medium-r-normal--*-80-*-*-*-*-iso10646-1"
 
  $ xterm -fn "-*-dejavu sans mono-medium-r-normal--*-80-*-*-*-*-iso10646-1"
  
Line 31: Line 31:
 
Two nearly indispensible utilities for working with XLFD names are 'xfontsel' [xorg-xfontsel] and 'xlsfonts' [xorg-xlsfonts].  Xfontsel uses dropdown menus for selecting parts of a font name and previews the font selected.  Xlsfonts can list fonts by name, with selectable degrees of detail, and can show how wildcards and aliases will be interpreted by the XLFD system:
 
Two nearly indispensible utilities for working with XLFD names are 'xfontsel' [xorg-xfontsel] and 'xlsfonts' [xorg-xlsfonts].  Xfontsel uses dropdown menus for selecting parts of a font name and previews the font selected.  Xlsfonts can list fonts by name, with selectable degrees of detail, and can show how wildcards and aliases will be interpreted by the XLFD system:
  
  $ xlsfonts -fn "*-fixed-medium-r-*-13-120-75-*-iso8859-1"
+
  $ xlsfonts -fn "*-fixed-medium-r-n*--13-120-75-*-iso1*-1"
 
  $ xlsfonts -ll -fn fixed
 
  $ xlsfonts -ll -fn fixed
  

Revision as of 19:50, 13 January 2013

How to write good

  1. Correct spelling is esential.
  2. Verbs always has to agree with their subjects.
  3. Avoid run-on sentences they are hard to read.
  4. About those fragments.
  5. Remember to not ever split an infinitive.
  6. Parentheses are (usually) not necessary.
  7. Do not end a sentence with a preposition. This is something the reader will not put up with.
  8. Use the apostrophe in it's proper place and omit it when its not needed.
  9. The passive voice is to be avoided.
  10. Proofread your writing to see if you any words out.

X Logical Font Description

Two different font systems are used by X11: the older X Logical Font Description (XLFD) and the newer X FreeType (Xft) systems.

XLFD was originally designed for bitmap fonts and support for scalable fonts (Type1, TrueType and OpenType) was added later. XLFD does not support anti‑aliasing and sub‑pixel rasterization. Xft uses the FreeType and Fontconfig libraries and may be more suitable when the smooth appearance of fonts is desired.

Font Names

Font names are complex when using XLFD:

-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso8859-1

The name contains fourteen elements, each element field preceded by a hyphen, '-'. Not all elements are required to be present in a font name and a field may be empty. Names can be simplified for the user by the wildcards '*' and '?'. Note that quotes are needed to prevent the shell from interpreting the wildcards and to avoid backslashing whitespace when a font name is used on the command-line. It is safest to make sure all fourteen fields are present, but sometimes concatenated fields do work with wildcards.

$ xterm -fn "-*-fixed-medium-r-s*--12-87-*-*-*-*-iso10???-1"
$ xterm -fn "-*-dejavu sans mono-medium-r-normal--*-80-*-*-*-*-iso10646-1"

Names can be simplified even more by using aliases:

$ xterm -fn 12x24

Two nearly indispensible utilities for working with XLFD names are 'xfontsel' [xorg-xfontsel] and 'xlsfonts' [xorg-xlsfonts]. Xfontsel uses dropdown menus for selecting parts of a font name and previews the font selected. Xlsfonts can list fonts by name, with selectable degrees of detail, and can show how wildcards and aliases will be interpreted by the XLFD system:

$ xlsfonts -fn "*-fixed-medium-r-n*--13-120-75-*-iso1*-1"
$ xlsfonts -ll -fn fixed

Font name elements

The following table provides a description of the font name fields with some tips on the usage. The elements are listed in the same order as they appear in a font name. The names used by xfontsel are listed below the long, uppercase names.

FOUNDRY
fndry
The supplier of the font.

This is useful when two different fonts share the same FAMILY_NAME, such as "Courier". Otherwise the wildcard, *, may be substituted.

FAMILY_NAME
fmly
The typeface name. Usually, fonts with the same family name are visually similar.

Many applications will choose a default font for the user unless this is named.

WEIGHT_NAME
wght
The degree of blackness of the glyphs. Somewhat ambiguous, common values are "bold" and "medium". XLFD will choose the first matching item, by lexicographic order unless this is specifically identified.

The user should set this value.

SLANT
slant
Common values are "r" for Roman or upright, and "i" and "o" for the slanted italic and oblique typefaces.

Usually this needs to be specified.

SETWIDTH_NAME
sWdth
Values are set by the designer, examples are "normal", "narrow" or "condensed" identifying the width.

A value must be given when there are two or more possible values.

ADD_STYLE
adstyl
Often an empty field, but values may be supplied by the foundry.

In xfontsel, an empty field is chosen by selecting '(nil)' from the dropdown box. It's often safe to wildcard this field with *.

PIXEL_SIZE
pxlsz
The body size of a font for a particular POINT_SIZE and RESOLUTION_Y. Changes the height of a font independent of the point size for which the font was designed.

Use a zero or a * for scalable fonts.

POINT_SIZE
ptSz
The body heighth for which the font was designed. Values are expressed as tenths of a point (one point is nominally one seventy-secondth of an inch).

Use this value to select the typeface size for scalable fonts and wildcard the PIXEL_SIZE field. The selections are artificially limited in xfontsel; change it on the command-line or in the resource file.

RESOLUTION_X
resx
The horizontal resolution, as an integer-string, for which the font was designed. The values are expressed as pixels or dpi.

For scalable fonts this may safely be set to zero or *, bitmap fonts usually use '75' or '100'.

RESOLUTION_Y
resy
The vertical dpi for which the font was designed.

Similar to RESOLUTION_X, scalable fonts can have this value set to zero or *. For bitmaps, only one of RESOLUTION_X or RESOLUTION_Y needs to be identified. The other may be wildcarded.

SPACING
spc
'p' – For proportional fonts

'm' – Monospace; all the glyphs have the same logical width.

'c' – Character cell; each glyph occupies a "frame" and the frames all have equal width. This is typewriter spacing.

Some older applications may leave glyph fragments when the display is refreshed if fonts with the 'm' spacing are used. For these apps, try using a font with 'c' spacing.

AVERAGE_WIDTH
avgWdth
Arithmetic mean of the widths of all glyphs. Zero is used for proportional fonts.

It is safe to wildcard this value with *.

CHARSET_REGISTRY
rgstry
Always paired with the next field, this names the registration authority for the character encoding used. Examples are iso10646 and koi8.

Except for ASCII only fonts, this must be named, not wildcarded. It's always safe to choose an available registry that is compatible with the user's locale settings.

CHARSET_ENCODING
encdng
An identifier for the character set encoding.

Font Installation