fntfilst.h
上传用户:lctgjx
上传日期:2022-06-04
资源大小:8887k
文件大小:6k
源码类别:

流媒体/Mpeg4/MP4

开发平台:

Visual C++

  1. /* $Xorg: fntfilst.h,v 1.5 2001/02/09 02:04:04 xorgcvs Exp $ */
  2. /*
  3. Copyright 1991, 1998  The Open Group
  4. Permission to use, copy, modify, distribute, and sell this software and its
  5. documentation for any purpose is hereby granted without fee, provided that
  6. the above copyright notice appear in all copies and that both that
  7. copyright notice and this permission notice appear in supporting
  8. documentation.
  9. The above copyright notice and this permission notice shall be included in
  10. all copies or substantial portions of the Software.
  11. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  12. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  13. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
  14. OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
  15. AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  16. CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  17. Except as contained in this notice, the name of The Open Group shall not be
  18. used in advertising or otherwise to promote the sale, use or other dealings
  19. in this Software without prior written authorization from The Open Group.
  20. */
  21. /* $XFree86: xc/lib/font/include/fntfilst.h,v 3.8 2002/12/09 17:30:00 dawes Exp $ */
  22. /*
  23.  * Author:  Keith Packard, MIT X Consortium
  24.  */
  25. #ifndef _FONTFILEST_H_
  26. #define _FONTFILEST_H_
  27. #ifndef FONTMODULE
  28. #include <X11/Xos.h>
  29. #endif
  30. #ifndef XP_PSTEXT
  31. #include <X11/fonts/fontmisc.h>
  32. #endif
  33. #include <X11/fonts/fontstruct.h>
  34. #include <X11/fonts/fontxlfd.h>
  35. #include <X11/fonts/fntfil.h>
  36. typedef struct _FontName {
  37.     char *name;
  38.     short length;
  39.     short ndashes;
  40. } FontNameRec;
  41. typedef struct _FontScaled {
  42.     FontScalableRec vals;
  43.     FontEntryPtr bitmap;
  44.     FontPtr pFont;
  45. } FontScaledRec;
  46. typedef struct _FontScalableExtra {
  47.     FontScalableRec defaults;
  48.     int numScaled;
  49.     int sizeScaled;
  50.     FontScaledPtr scaled;
  51.     pointer private;
  52. } FontScalableExtraRec;
  53. typedef struct _FontScalableEntry {
  54.     FontRendererPtr     renderer;
  55.     char     *fileName;
  56.     FontScalableExtraPtr   extra;
  57. } FontScalableEntryRec;
  58. /*
  59.  * This "can't" work yet - the returned alias string must be permanent,
  60.  * but this layer would need to generate the appropriate name from the
  61.  * resolved scalable + the XLFD values passed in.  XXX
  62.  */
  63. typedef struct _FontScaleAliasEntry {
  64.     char *resolved;
  65. } FontScaleAliasEntryRec;
  66. typedef struct _FontBitmapEntry {
  67.     FontRendererPtr renderer;
  68.     char *fileName;
  69.     FontPtr pFont;
  70. } FontBitmapEntryRec;
  71. typedef struct _FontAliasEntry {
  72.     char *resolved;
  73. } FontAliasEntryRec;
  74. typedef struct _FontBCEntry {
  75.     FontScalableRec     vals;
  76.     FontEntryPtr     entry;
  77. } FontBCEntryRec;
  78. typedef struct _FontEntry {
  79.     FontNameRec name;
  80.     int type;
  81.     union _FontEntryParts {
  82. FontScalableEntryRec scalable;
  83. FontBitmapEntryRec bitmap;
  84. FontAliasEntryRec alias;
  85. FontBCEntryRec bc;
  86.     } u;
  87. } FontEntryRec;
  88. typedef struct _FontTable {
  89.     int     used;
  90.     int     size;
  91.     FontEntryPtr    entries;
  92.     Bool     sorted;
  93. } FontTableRec;
  94. typedef struct _FontDirectory {
  95.     char     *directory;
  96.     unsigned long   dir_mtime;
  97.     unsigned long   alias_mtime;
  98.     FontTableRec    scalable;
  99.     FontTableRec    nonScalable;
  100.     char     *attributes;
  101. } FontDirectoryRec;
  102. /* Capability bits: for definition of capabilities bitmap in the
  103.    FontRendererRec to indicate support of XLFD enhancements */
  104. #define CAP_MATRIX 0x1
  105. #define CAP_CHARSUBSETTING 0x2
  106. typedef struct _FontRenderer {
  107.     char    *fileSuffix;
  108.     int     fileSuffixLen;
  109.     int     (*OpenBitmap)(FontPathElementPtr /* fpe */, 
  110.   FontPtr * /* pFont */,
  111.   int /* flags */, 
  112.   FontEntryPtr /* entry */, 
  113.   char * /* fileName */, 
  114.   fsBitmapFormat /* format */, 
  115.   fsBitmapFormatMask /* mask */,
  116.   FontPtr /* non_cachable_font */);
  117.     int     (*OpenScalable)(FontPathElementPtr /* fpe */, 
  118.     FontPtr * /* pFont */, 
  119.     int /* flags */, 
  120.     FontEntryPtr /* entry */, 
  121.     char * /* fileName */, 
  122.     FontScalablePtr /* vals */, 
  123.     fsBitmapFormat /* format */, 
  124.     fsBitmapFormatMask /* fmask */,
  125.     FontPtr /* non_cachable_font */);
  126.     int     (*GetInfoBitmap)(FontPathElementPtr /* fpe */, 
  127.      FontInfoPtr /* pFontInfo */, 
  128.      FontEntryPtr /* entry */, 
  129.      char * /*fileName */);
  130.     int     (*GetInfoScalable)(FontPathElementPtr /* fpe */, 
  131.        FontInfoPtr /* pFontInfo */, 
  132.        FontEntryPtr /* entry */, 
  133.        FontNamePtr /* fontName */,
  134.        char * /* fileName */, 
  135.        FontScalablePtr /* vals */);
  136.     int     number;
  137.     int     capabilities; /* Bitmap components defined above */
  138. } FontRendererRec;
  139. typedef struct _FontRenders {
  140.     int     number;
  141.     struct _FontRenderersElement {
  142.         /* In order to preserve backward compatibility, the
  143.            priority field is made invisible to renderers */
  144.         FontRendererPtr renderer;
  145.         int priority;
  146.     } *renderers;
  147. } FontRenderersRec, *FontRenderersPtr;
  148. typedef struct _BitmapInstance {
  149.     FontScalableRec vals;
  150.     FontBitmapEntryPtr bitmap;
  151. } BitmapInstanceRec, *BitmapInstancePtr;
  152. typedef struct _BitmapScalablePrivate {
  153.     int numInstances;
  154.     BitmapInstancePtr instances;
  155. } BitmapScalablePrivateRec, *BitmapScalablePrivatePtr;
  156. typedef struct _BitmapSources {
  157.     FontPathElementPtr *fpe;
  158.     int size;
  159.     int count;
  160. } BitmapSourcesRec, *BitmapSourcesPtr;
  161. extern BitmapSourcesRec FontFileBitmapSources;
  162. /* Defines for FontFileFindNamesInScalableDir() behavior */
  163. #define NORMAL_ALIAS_BEHAVIOR 0
  164. #define LIST_ALIASES_AND_TARGET_NAMES   (1<<0)
  165. #define IGNORE_SCALABLE_ALIASES (1<<1)
  166. #endif /* _FONTFILEST_H_ */