#include "MagickCore/studio.h"#include "MagickCore/blob.h"#include "MagickCore/client.h"#include "MagickCore/configure.h"#include "MagickCore/draw.h"#include "MagickCore/exception.h"#include "MagickCore/exception-private.h"#include "MagickCore/image-private.h"#include "MagickCore/linked-list.h"#include "MagickCore/log.h"#include "MagickCore/memory_.h"#include "MagickCore/memory-private.h"#include "MagickCore/nt-feature.h"#include "MagickCore/nt-base-private.h"#include "MagickCore/option.h"#include "MagickCore/semaphore.h"#include "MagickCore/splay-tree.h"#include "MagickCore/string_.h"#include "MagickCore/string-private.h"#include "MagickCore/type.h"#include "MagickCore/type-private.h"#include "MagickCore/token.h"#include "MagickCore/utility.h"#include "MagickCore/utility-private.h"#include "MagickCore/xml-tree.h"#include "fontconfig/fontconfig.h"Defines | |
| #define | FC_WIDTH "width" |
| #define | FC_WIDTH_ULTRACONDENSED 50 |
| #define | FC_WIDTH_EXTRACONDENSED 63 |
| #define | FC_WIDTH_CONDENSED 75 |
| #define | FC_WIDTH_SEMICONDENSED 87 |
| #define | FC_WIDTH_NORMAL 100 |
| #define | FC_WIDTH_SEMIEXPANDED 113 |
| #define | FC_WIDTH_EXPANDED 125 |
| #define | FC_WIDTH_EXTRAEXPANDED 150 |
| #define | FC_WIDTH_ULTRAEXPANDED 200 |
| #define | FC_WEIGHT_THIN 0 |
| #define | FC_WEIGHT_EXTRALIGHT 40 |
| #define | FC_WEIGHT_ULTRALIGHT FC_WEIGHT_EXTRALIGHT |
| #define | FC_WEIGHT_LIGHT 50 |
| #define | FC_WEIGHT_BOOK 75 |
| #define | FC_WEIGHT_REGULAR 80 |
| #define | FC_WEIGHT_NORMAL FC_WEIGHT_REGULAR |
| #define | FC_WEIGHT_MEDIUM 100 |
| #define | FC_WEIGHT_DEMIBOLD 180 |
| #define | FC_WEIGHT_SEMIBOLD FC_WEIGHT_DEMIBOLD |
| #define | FC_WEIGHT_BOLD 200 |
| #define | FC_WEIGHT_EXTRABOLD 205 |
| #define | FC_WEIGHT_ULTRABOLD FC_WEIGHT_EXTRABOLD |
| #define | FC_WEIGHT_BLACK 210 |
| #define | FC_WEIGHT_HEAVY FC_WEIGHT_BLACK |
| #define | MagickTypeFilename "type.xml" |
| #define | FC_FULLNAME "fullname" |
Functions | |
| static MagickBooleanType | IsTypeTreeInstantiated (ExceptionInfo *) |
| static MagickBooleanType | LoadTypeCache (SplayTreeInfo *, const char *, const char *, const size_t, ExceptionInfo *) |
| static void * | DestroyTypeNode (void *type_info) |
| static SplayTreeInfo * | AcquireTypeCache (const char *filename, ExceptionInfo *exception) |
| MagickExport const TypeInfo * | GetTypeInfo (const char *name, ExceptionInfo *exception) |
| MagickExport const TypeInfo * | GetTypeInfoByFamily (const char *family, const StyleType style, const StretchType stretch, const size_t weight, ExceptionInfo *exception) |
| static int | TypeInfoCompare (const void *x, const void *y) |
| MagickExport const TypeInfo ** | GetTypeInfoList (const char *pattern, size_t *number_fonts, ExceptionInfo *exception) |
| static int | TypeCompare (const void *x, const void *y) |
| MagickExport char ** | GetTypeList (const char *pattern, size_t *number_fonts, ExceptionInfo *exception) |
| MagickExport MagickBooleanType | LoadFontConfigFonts (SplayTreeInfo *type_cache, ExceptionInfo *exception) |
| MagickExport MagickBooleanType | ListTypeInfo (FILE *file, ExceptionInfo *exception) |
| static MagickBooleanType | SetTypeNodePath (const char *filename, char *font_path, const char *token, char **target) |
| MagickPrivate MagickBooleanType | TypeComponentGenesis (void) |
| MagickPrivate void | TypeComponentTerminus (void) |
Variables | |
| static const char | TypeMap [] |
| static SemaphoreInfo * | type_semaphore = (SemaphoreInfo *) NULL |
| static SplayTreeInfo * | type_cache = (SplayTreeInfo *) NULL |
| #define FC_FULLNAME "fullname" |
Referenced by LoadFontConfigFonts().
| #define FC_WEIGHT_BLACK 210 |
Referenced by LoadFontConfigFonts().
| #define FC_WEIGHT_BOLD 200 |
Referenced by LoadFontConfigFonts().
| #define FC_WEIGHT_BOOK 75 |
| #define FC_WEIGHT_DEMIBOLD 180 |
Referenced by LoadFontConfigFonts().
| #define FC_WEIGHT_EXTRABOLD 205 |
Referenced by LoadFontConfigFonts().
| #define FC_WEIGHT_EXTRALIGHT 40 |
Referenced by LoadFontConfigFonts().
| #define FC_WEIGHT_HEAVY FC_WEIGHT_BLACK |
| #define FC_WEIGHT_LIGHT 50 |
Referenced by LoadFontConfigFonts().
| #define FC_WEIGHT_MEDIUM 100 |
Referenced by LoadFontConfigFonts().
| #define FC_WEIGHT_NORMAL FC_WEIGHT_REGULAR |
Referenced by LoadFontConfigFonts().
| #define FC_WEIGHT_REGULAR 80 |
| #define FC_WEIGHT_SEMIBOLD FC_WEIGHT_DEMIBOLD |
| #define FC_WEIGHT_THIN 0 |
Referenced by LoadFontConfigFonts().
| #define FC_WEIGHT_ULTRABOLD FC_WEIGHT_EXTRABOLD |
| #define FC_WEIGHT_ULTRALIGHT FC_WEIGHT_EXTRALIGHT |
| #define FC_WIDTH "width" |
Referenced by LoadFontConfigFonts().
| #define FC_WIDTH_CONDENSED 75 |
Referenced by LoadFontConfigFonts().
| #define FC_WIDTH_EXPANDED 125 |
Referenced by LoadFontConfigFonts().
| #define FC_WIDTH_EXTRACONDENSED 63 |
Referenced by LoadFontConfigFonts().
| #define FC_WIDTH_EXTRAEXPANDED 150 |
Referenced by LoadFontConfigFonts().
| #define FC_WIDTH_NORMAL 100 |
Referenced by LoadFontConfigFonts().
| #define FC_WIDTH_SEMICONDENSED 87 |
Referenced by LoadFontConfigFonts().
| #define FC_WIDTH_SEMIEXPANDED 113 |
Referenced by LoadFontConfigFonts().
| #define FC_WIDTH_ULTRACONDENSED 50 |
Referenced by LoadFontConfigFonts().
| #define FC_WIDTH_ULTRAEXPANDED 200 |
Referenced by LoadFontConfigFonts().
| #define MagickTypeFilename "type.xml" |
Referenced by IsTypeTreeInstantiated().
| static SplayTreeInfo* AcquireTypeCache | ( | const char * | filename, | |
| ExceptionInfo * | exception | |||
| ) | [static] |
References CompareSplayTreeString(), CopyMagickString(), DestroyConfigureOptions(), DestroyString(), DestroyTypeNode(), DirectorySeparator, FileToString(), FormatLocaleString(), GetConfigureOptions(), GetEnvironmentValue(), GetNextValueInLinkedList(), GetNumberOfNodesInSplayTree(), GetStringInfoDatum(), GetStringInfoPath(), LoadTypeCache(), MagickPathExtent, MagickTrue, NewSplayTree(), and TypeMap.
Referenced by IsTypeTreeInstantiated().
| static void* DestroyTypeNode | ( | void * | type_info | ) | [static] |
References _TypeInfo::description, DestroyString(), _TypeInfo::encoding, _TypeInfo::family, _TypeInfo::format, _TypeInfo::foundry, _TypeInfo::glyphs, _TypeInfo::metrics, _TypeInfo::name, _TypeInfo::path, and RelinquishMagickMemory().
Referenced by AcquireTypeCache(), and LoadTypeCache().
| MagickExport const TypeInfo* GetTypeInfo | ( | const char * | name, | |
| ExceptionInfo * | exception | |||
| ) |
References GetRootValueFromSplayTree(), GetValueFromSplayTree(), IsTypeTreeInstantiated(), LocaleCompare(), MagickFalse, and type_cache.
Referenced by GetTypeInfoByFamily(), GetTypeInfoList(), GetTypeList(), and RenderType().
| MagickExport const TypeInfo* GetTypeInfoByFamily | ( | const char * | family, | |
| const StyleType | style, | |||
| const StretchType | stretch, | |||
| const size_t | weight, | |||
| ExceptionInfo * | exception | |||
| ) |
References AnyStretch, AnyStyle, _TypeInfo::family, GetMagickModule, GetNextValueInSplayTree(), GetTypeInfo(), ItalicStyle, LocaleCompare(), LockSemaphoreInfo(), MagickMax, MagickMin, NormalStretch, ObliqueStyle, ResetSplayTreeIterator(), _TypeInfo::stretch, _TypeInfo::style, ThrowMagickException(), type_cache, type_semaphore, TypeWarning, UltraExpandedStretch, UndefinedStretch, UndefinedStyle, UnlockSemaphoreInfo(), and _TypeInfo::weight.
Referenced by RenderType().
| MagickExport const TypeInfo** GetTypeInfoList | ( | const char * | pattern, | |
| size_t * | number_fonts, | |||
| ExceptionInfo * | exception | |||
| ) |
References AcquireQuantumMemory(), GetMagickModule, GetNextValueInSplayTree(), GetNumberOfNodesInSplayTree(), GetTypeInfo(), GlobExpression(), LockSemaphoreInfo(), LogMagickEvent(), MagickFalse, _TypeInfo::name, ResetSplayTreeIterator(), _TypeInfo::stealth, TraceEvent, type_cache, type_semaphore, TypeInfoCompare(), and UnlockSemaphoreInfo().
Referenced by ListTypeInfo().
| MagickExport char** GetTypeList | ( | const char * | pattern, | |
| size_t * | number_fonts, | |||
| ExceptionInfo * | exception | |||
| ) |
References AcquireQuantumMemory(), ConstantString(), GetMagickModule, GetNextValueInSplayTree(), GetNumberOfNodesInSplayTree(), GetTypeInfo(), GlobExpression(), LockSemaphoreInfo(), LogMagickEvent(), MagickFalse, _TypeInfo::name, ResetSplayTreeIterator(), _TypeInfo::stealth, TraceEvent, type_cache, type_semaphore, TypeCompare(), and UnlockSemaphoreInfo().
| static MagickBooleanType IsTypeTreeInstantiated | ( | ExceptionInfo * | exception | ) | [static] |
References AcquireTypeCache(), ActivateSemaphoreInfo(), LoadFontConfigFonts(), LockSemaphoreInfo(), MagickFalse, MagickTrue, MagickTypeFilename, NTAcquireTypeCache(), type_cache, type_semaphore, and UnlockSemaphoreInfo().
Referenced by GetTypeInfo().
| MagickExport MagickBooleanType ListTypeInfo | ( | FILE * | file, | |
| ExceptionInfo * | exception | |||
| ) |
References CommandOptionToMnemonic(), _TypeInfo::family, FormatLocaleFile(), FormatLocaleString(), GetTypeInfoList(), _TypeInfo::glyphs, LocaleCompare(), MagickFalse, MagickPathExtent, MagickStretchOptions, MagickStyleOptions, MagickTrue, _TypeInfo::name, _TypeInfo::path, RelinquishMagickMemory(), and _TypeInfo::weight.
| MagickExport MagickBooleanType LoadFontConfigFonts | ( | SplayTreeInfo * | type_cache, | |
| ExceptionInfo * | exception | |||
| ) |
References AcquireQuantumMemory(), AddValueToSplayTree(), ConcatenateMagickString(), CondensedStretch, ConstantString(), CopyMagickString(), ExpandedStretch, ExtensionPath, ExtraCondensedStretch, ExtraExpandedStretch, _TypeInfo::family, FC_FULLNAME, FC_WEIGHT_BLACK, FC_WEIGHT_BOLD, FC_WEIGHT_DEMIBOLD, FC_WEIGHT_EXTRABOLD, FC_WEIGHT_EXTRALIGHT, FC_WEIGHT_LIGHT, FC_WEIGHT_MEDIUM, FC_WEIGHT_NORMAL, FC_WEIGHT_THIN, FC_WIDTH, FC_WIDTH_CONDENSED, FC_WIDTH_EXPANDED, FC_WIDTH_EXTRACONDENSED, FC_WIDTH_EXTRAEXPANDED, FC_WIDTH_NORMAL, FC_WIDTH_SEMICONDENSED, FC_WIDTH_SEMIEXPANDED, FC_WIDTH_ULTRACONDENSED, FC_WIDTH_ULTRAEXPANDED, GetPathComponent(), _TypeInfo::glyphs, ItalicStyle, LocaleCompare(), MagickCoreSignature, MagickFalse, MagickPathExtent, MagickTrue, _TypeInfo::name, NormalStretch, NormalStyle, ObliqueStyle, _TypeInfo::path, SemiCondensedStretch, SemiExpandedStretch, _TypeInfo::signature, _TypeInfo::stretch, _TypeInfo::style, SubstituteString(), UltraCondensedStretch, UltraExpandedStretch, and _TypeInfo::weight.
Referenced by IsTypeTreeInstantiated().
| static MagickBooleanType LoadTypeCache | ( | SplayTreeInfo * | cache, | |
| const char * | xml, | |||
| const char * | filename, | |||
| const size_t | depth, | |||
| ExceptionInfo * | exception | |||
| ) |
References AcquireCriticalMemory(), AcquireExceptionInfo(), AcquireString(), AddValueToSplayTree(), ConcatenateMagickString(), ConfigureError, ConfigureEvent, ConstantString(), CopyMagickString(), _TypeInfo::description, DestroyExceptionInfo(), DestroyTypeNode(), DirectorySeparator, _TypeInfo::encoding, _TypeInfo::face, _TypeInfo::family, FileToString(), _TypeInfo::format, _TypeInfo::foundry, GetMagickModule, GetNextToken(), GetPathComponent(), _TypeInfo::glyphs, HeadPath, IsStringTrue(), LocaleCompare(), LocaleNCompare(), LogMagickEvent(), MagickCoreSignature, MagickFalse, MagickMaxRecursionDepth, MagickPathExtent, MagickStretchOptions, MagickStyleOptions, MagickTrue, MagickWeightOptions, _TypeInfo::metrics, _TypeInfo::name, ParseCommandOption(), _TypeInfo::path, RelinquishMagickMemory(), ResourceLimitError, SetTypeNodePath(), _TypeInfo::signature, _TypeInfo::stealth, _TypeInfo::stretch, StringToUnsignedLong(), _TypeInfo::style, ThrowMagickException(), and _TypeInfo::weight.
Referenced by AcquireTypeCache().
| static MagickBooleanType SetTypeNodePath | ( | const char * | filename, | |
| char * | font_path, | |||
| const char * | token, | |||
| char ** | target | |||
| ) | [inline, static] |
References ConcatenateMagickString(), ConstantString(), DestroyString(), DirectorySeparator, GetPathComponent(), HeadPath, IsPathAccessible(), MagickFalse, MagickPathExtent, MagickTrue, and SubstituteString().
Referenced by LoadTypeCache().
| static int TypeCompare | ( | const void * | x, | |
| const void * | y | |||
| ) | [static] |
References LocaleCompare().
Referenced by GetTypeList().
| MagickPrivate MagickBooleanType TypeComponentGenesis | ( | void | ) |
References AcquireSemaphoreInfo(), MagickTrue, and type_semaphore.
Referenced by MagickCoreGenesis().
| MagickPrivate void TypeComponentTerminus | ( | void | ) |
References ActivateSemaphoreInfo(), DestroySplayTree(), LockSemaphoreInfo(), RelinquishSemaphoreInfo(), type_cache, type_semaphore, and UnlockSemaphoreInfo().
Referenced by MagickCoreTerminus().
| static int TypeInfoCompare | ( | const void * | x, | |
| const void * | y | |||
| ) | [static] |
References LocaleCompare().
Referenced by GetTypeInfoList().
SplayTreeInfo* type_cache = (SplayTreeInfo *) NULL [static] |
Referenced by GetTypeInfo(), GetTypeInfoByFamily(), GetTypeInfoList(), GetTypeList(), IsTypeTreeInstantiated(), and TypeComponentTerminus().
SemaphoreInfo* type_semaphore = (SemaphoreInfo *) NULL [static] |
const char TypeMap[] [static] |
"<?xml version=\"1.0\"?>"
"<typemap>"
" <type stealth=\"True\" name=\"fixed\" family=\"helvetica\"/>"
" <type stealth=\"True\" name=\"helvetica\" family=\"helvetica\"/>"
"</typemap>"
Referenced by AcquireTypeCache().
1.6.1