chromium/third_party/fontconfig/src/src/fcfreetype.c

/*
 * fontconfig/src/fcfreetype.c
 *
 * Copyright © 2001 Keith Packard
 *
 * Permission to use, copy, modify, distribute, and sell this software and its
 * documentation for any purpose is hereby granted without fee, provided that
 * the above copyright notice appear in all copies and that both that
 * copyright notice and this permission notice appear in supporting
 * documentation, and that the name of the author(s) not be used in
 * advertising or publicity pertaining to distribution of the software without
 * specific, written prior permission.  The authors make no
 * representations about the suitability of this software for any purpose.  It
 * is provided "as is" without express or implied warranty.
 *
 * THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
 * EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
 * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 * PERFORMANCE OF THIS SOFTWARE.
 */

#include "fcint.h"
#include "fcftint.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <fcntl.h>
#include <ft2build.h>
#include FT_FREETYPE_H
#include FT_ADVANCES_H
#include FT_TRUETYPE_TABLES_H
#include FT_SFNT_NAMES_H
#include FT_TRUETYPE_IDS_H
#include FT_TYPE1_TABLES_H
#if HAVE_FT_GET_X11_FONT_FORMAT
#include FT_XFREE86_H
#endif
#if HAVE_FT_GET_BDF_PROPERTY
#include FT_BDF_H
#include FT_MODULE_H
#endif
#include FT_MULTIPLE_MASTERS_H

#include "fcfoundry.h"
#include "ftglue.h"

/*
 * Keep Han languages separated by eliminating languages
 * that the codePageRange bits says aren't supported
 */

static const struct {} FcCodePageRange[] =;

#define NUM_CODE_PAGE_RANGE

FcBool
FcFreeTypeIsExclusiveLang (const FcChar8  *lang)
{}

FcFtEncoding;

#define TT_ENCODING_DONT_CARE
#define FC_ENCODING_MAC_ROMAN

static const FcFtEncoding   fcFtEncoding[] =;

#define NUM_FC_FT_ENCODING

FcFtLanguage;

#define TT_LANGUAGE_DONT_CARE

static const FcFtLanguage   fcFtLanguage[] =;

#define NUM_FC_FT_LANGUAGE

FcMacRomanFake;

static const FcMacRomanFake fcMacRomanFake[] =;

static FcChar8 *
FcFontCapabilities(FT_Face face);

static FcBool
FcFontHasHint (FT_Face face);

static int
FcFreeTypeSpacing (FT_Face face);

#define NUM_FC_MAC_ROMAN_FAKE


/* From http://www.unicode.org/Public/MAPPINGS/VENDORS/APPLE/ROMAN.TXT */
static const FcChar16 fcMacRomanNonASCIIToUnicode[128] =;

#if USE_ICONV
#include <iconv.h>
#endif

/*
 * A shift-JIS will have many high bits turned on
 */
static FcBool
FcLooksLikeSJIS (FcChar8 *string, int len)
{}

static FcChar8 *
FcSfntNameTranscode (FT_SfntName *sname)
{}

static const FcChar8 *
FcSfntNameLanguage (FT_SfntName *sname)
{}

static const FcChar8 *
FcNoticeFoundry(const FT_String *notice)
{}

FcStringConst;

static int
FcStringIsConst (const FcChar8		*string,
		 const FcStringConst	*c,
		 int			nc)
{}

static int
FcStringContainsConst (const FcChar8	    *string,
		       const FcStringConst  *c,
		       int		    nc)
{}

FC8;

static const FcStringConst  weightConsts[] =;

#define NUM_WEIGHT_CONSTS

#define FcIsWeight(s)
#define FcContainsWeight(s)

static const FcStringConst  widthConsts[] =;

#define NUM_WIDTH_CONSTS

#define FcIsWidth(s)
#define FcContainsWidth(s)

static const FcStringConst  slantConsts[] =;

#define NUM_SLANT_CONSTS

#define FcContainsSlant(s)

static const FcStringConst  decorativeConsts[] =;

#define NUM_DECORATIVE_CONSTS

#define FcContainsDecorative(s)

static double
FcGetPixelSize (FT_Face face, int i)
{}

static FcBool
FcStringInPatternElement (FcPattern *pat, FcObject obj, const FcChar8 *string)
{}

static const FT_UShort platform_order[] =;
#define NUM_PLATFORM_ORDER

static const FT_UShort nameid_order[] =;

#define NUM_NAMEID_ORDER

FcNameMapping;

static FcBool
_is_english(int platform, int language)
{}

static int
name_mapping_cmp (const void *pa, const void *pb)
{}

static int
FcFreeTypeGetFirstName (const FT_Face face,
			unsigned int  platform,
			unsigned int  nameid,
			FcNameMapping *mapping,
			unsigned int   count,
			FT_SfntName   *sname)
{}

static FcPattern *
FcFreeTypeQueryFaceInternal (const FT_Face  face,
			     const FcChar8  *file,
			     unsigned int   id,
			     FcCharSet      **cs_share,
			     FcLangSet      **ls_share,
			     FcNameMapping  **nm_share)
{}

FcPattern *
FcFreeTypeQueryFace (const FT_Face  face,
		     const FcChar8  *file,
		     unsigned int   id,
		     FcBlanks	    *blanks FC_UNUSED)
{}

FcPattern *
FcFreeTypeQuery(const FcChar8	*file,
		unsigned int	id,
		FcBlanks	*blanks FC_UNUSED,
		int		*count)
{}

unsigned int
FcFreeTypeQueryAll(const FcChar8	*file,
		   unsigned int		id,
		   FcBlanks		*blanks,
		   int			*count,
		   FcFontSet            *set)
{}


static const FT_Encoding fcFontEncodings[] =;

#define NUM_DECODE

/*
 * Map a UCS4 glyph to a glyph index.  Use all available encoding
 * tables to try and find one that works.  This information is expected
 * to be cached by higher levels, so performance isn't critical
 */

FT_UInt
FcFreeTypeCharIndex (FT_Face face, FcChar32 ucs4)
{}

static inline int fc_min (int a, int b) {}
static inline int fc_max (int a, int b) {}
static inline FcBool fc_approximately_equal (int x, int y)
{}

static int
FcFreeTypeSpacing (FT_Face face)
{}

FcCharSet *
FcFreeTypeCharSet (FT_Face face, FcBlanks *blanks FC_UNUSED)
{}

FcCharSet *
FcFreeTypeCharSetAndSpacing (FT_Face face, FcBlanks *blanks FC_UNUSED, int *spacing)
{}


#define TTAG_GPOS
#define TTAG_GSUB
#define TTAG_SILF
#define TTAG_prep

#define OTLAYOUT_HEAD
#define OTLAYOUT_HEAD_LEN
#define OTLAYOUT_ID_LEN
/* space + head + id */
#define OTLAYOUT_LEN

/*
 * This is a bit generous; the registry has only lower case and space
 * except for 'DFLT'.
 */
#define FcIsSpace(x)
#define FcIsDigit(c)
#define FcIsValidScript(x)

static void
addtag(FcChar8 *complex_, FT_ULong tag)
{}

static int
compareulong (const void *a, const void *b)
{}

static FcBool
FindTable (FT_Face face, FT_ULong tabletag)
{}

static int
GetScriptTags(FT_Face face, FT_ULong tabletag, FT_ULong **stags)
{}

static FcChar8 *
FcFontCapabilities(FT_Face face)
{}

static FcBool
FcFontHasHint (FT_Face face)
{}


#define __fcfreetype__
#include "fcaliastail.h"
#include "fcftaliastail.h"
#undef __fcfreetype__