Magnus Woldrich > Xorg-XLFD-0.128 > Xorg::XLFD

Download:
Xorg-XLFD-0.128.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.128   Source  

NAME ^

Xorg::XLFD - X11 logical font description interface

SYNOPSIS ^

    use Xorg::XLFD qw(get_xlfd);

    my $desc = get_xlfd();         # all descriptions

    my $fixed = get_xlfd('fixed'); # description for the 'fixed' font

DESCRIPTION ^

X logical font description is a font standard used by the X Window System. This module provides an interface for accessing these descriptions.

EXPORTS ^

None by default.

FUNCTIONS ^

get_xlfd()

get_xlfd() takes one optional argument, a family name. If no argument is provided, all available descriptions will be returned.

STRUCTURE

An example structure for the standard 'Fixed' font:

              fixed => {
                         charset => [
                                      "jisx0208.1983",
                                      "iso10646",
                                      "iso8859",
                                      "koi8",
                                      "jisx0201.1976",
                                      0,
                                      120,
                                      180
                                    ],
                         foundary => [
                                       "jis",
                                       "misc",
                                       "sony"
                                     ],
                         horiz_dpi => [
                                        75,
                                        100,
                                        0,
                                        120
                                      ],
                         pixels => [
                                     0,
                                     16,
                                     24,
                                     13,
                                     14,
                                     15,
                                     18,
                                     10,
                                     20,
                                     6,
                                     7,
                                     8,
                                     9,
                                     "ja",
                                     "ko",
                                     12
                                   ],
                         "set width" => [
                                          "normal",
                                          "semicondensed"
                                        ],
                         slant => [
                                    "r",
                                    "o"
                                  ],
                         spacing => [
                                      "c",
                                      100,
                                      75
                                    ],
                         tenths => [
                                     0,
                                     110,
                                     150,
                                     170,
                                     230,
                                     100,
                                     120,
                                     130,
                                     140,
                                     70,
                                     200,
                                     60,
                                     50,
                                     80,
                                     90,
                                     13,
                                     18
                                   ],
                         vert_dpi => [
                                       75,
                                       100
                                     ],
                         weight => [
                                     "medium",
                                     "bold"
                                   ],
                         width => [
                                    0,
                                    160,
                                    240,
                                    70,
                                    80,
                                    90,
                                    60,
                                    140,
                                    100,
                                    40,
                                    50,
                                    "c",
                                    120
                                  ]
                       },

XLFD SPECIFICATION ^

The XLFD is made up from 12/14 font properties as visualized below.

  -xos4-terminus-medium-r-normal--28-280-72-72-c-140-iso8859-1
   |     |        |    |   |     |   |   |  | |  |     |__________ charset
   |     |        |    |   |     |   |   |  | |  |________________ avg. width
   |     |        |    |   |     |   |   |  | |___________________ spacing
   |     |        |    |   |     |   |   |  |_____________________ vert. dpi
   |     |        |    |   |     |   |   |________________________ horiz. dpi
   |     |        |    |   |     |   |____________________________ 10th's of 1 pt
   |     |        |    |   |     |________________________________ pixels
   |     |        |    |   |______________________________________ set width
   |     |        |    |__________________________________________ slant
   |     |        |_______________________________________________ weight
   |     |________________________________________________________ family
   |______________________________________________________________ foundary

CAVEATS ^

We are relying on an external application for fetching the available font descriptions. This is not good. We will look at the xlsfonts source code and try to come up with a smarter way.

REPORTING BUGS ^

Report bugs on rt.cpan.org or to magnus@trapd00r.se

AUTHOR ^

  Magnus Woldrich
  CPAN ID: WOLDRICH
  magnus@trapd00r.se
  http://japh.se

CONTRIBUTORS ^

None required yet.

COPYRIGHT ^

Copyright 2011 the Xorg::XLFD "AUTHOR" and "CONTRIBUTORS" as listed above.

LICENSE ^

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

syntax highlighting: