~ubuntu-branches/ubuntu/precise/libxfont/precise-security

« back to all changes in this revision

Viewing changes to src/fontfile/register.c

  • Committer: Bazaar Package Importer
  • Author(s): Julien Cristau
  • Date: 2007-04-11 15:52:11 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20070411155211-6ed2v2akv5dq8uev
Tags: 1:1.2.8-1
* Add XS-Vcs-Browser to debian/control.
* New upstream release.
  + drop patch from 1:1.2.2-2, applied upstream.
* Upload to unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
#include <X11/fonts/fontmisc.h>
43
43
#include <X11/fonts/fntfilst.h>
44
44
#include <X11/fonts/bitmap.h>
45
 
 
46
 
#ifdef LOADABLEFONTS
47
45
#include <X11/fonts/fontmod.h>
48
 
#endif
49
46
 
50
47
/*
51
48
 * Translate monolithic build symbols to modular build symbols.
67
64
# define XFONT_FREETYPE 1
68
65
#endif
69
66
 
 
67
/* Font renderers to initialize when not linked into something like
 
68
   Xorg that provides its own module configuration options */
 
69
static const FontModule builtinFontModuleList[] = {
 
70
#ifdef XFONT_SPEEDO
 
71
    {
 
72
        SpeedoRegisterFontFileFunctions,
 
73
        "speedo",
 
74
        NULL
 
75
    },
 
76
#endif
 
77
#ifdef XFONT_TYPE1
 
78
    {
 
79
        Type1RegisterFontFileFunctions,
 
80
        "type1",
 
81
        NULL
 
82
    },
 
83
#endif
 
84
#ifdef XFONT_FREETYPE    
 
85
    {
 
86
        FreeTypeRegisterFontFileFunctions,
 
87
        "freetype",
 
88
        NULL
 
89
    },
 
90
#endif
 
91
    /* List terminator - must be last entry */
 
92
    {   NULL, NULL, NULL }
 
93
};
 
94
 
70
95
void
71
96
FontFileRegisterFpeFunctions(void)
72
97
{
73
 
#ifndef LOADABLEFONTS
 
98
    FontModule *fmlist = builtinFontModuleList;
74
99
 
75
100
#ifdef XFONT_BITMAP
 
101
    /* bitmap is always builtin to libXfont now */
76
102
    BitmapRegisterFontFileFunctions ();
77
103
#endif
78
 
#ifdef XFONT_SPEEDO
79
 
    SpeedoRegisterFontFileFunctions ();
80
 
#endif
81
 
#ifdef XFONT_TYPE1
82
 
    Type1RegisterFontFileFunctions();
83
 
#endif
84
 
#ifdef XFONT_FREETYPE
85
 
    FreeTypeRegisterFontFileFunctions();
86
 
#endif
87
 
 
88
 
#else
89
 
    {
 
104
 
 
105
#ifdef LOADABLEFONTS
 
106
    if (FontModuleList) {
 
107
        fmlist = FontModuleList;
 
108
    }
 
109
#endif    
 
110
 
 
111
    if (fmlist) {
90
112
        int i;
91
113
 
92
 
        if (FontModuleList) {
93
 
            for (i = 0; FontModuleList[i].name; i++) {
94
 
                if (FontModuleList[i].initFunc)
95
 
                    FontModuleList[i].initFunc();
 
114
        for (i = 0; fmlist[i].name; i++) {
 
115
            if (fmlist[i].initFunc) {
 
116
                fmlist[i].initFunc();
96
117
            }
97
118
        }
98
119
    }
99
 
#endif
100
120
    
101
121
    FontFileRegisterLocalFpeFunctions ();
102
122
}