1605 {
1611
1613
1614#ifdef FT_CONFIG_OPTION_INCREMENTAL
1617 FT_Bool glyph_data_loaded = 0;
1618#endif
1619
1620
1621#ifdef FT_DEBUG_LEVEL_TRACE
1622 if ( recurse_count )
1623 FT_TRACE5((
" nesting level: %d\n", recurse_count ));
1624#endif
1625
1626
1627 if ( recurse_count >
face->max_profile.maxComponentDepth )
1628 {
1629 FT_TRACE1((
"load_truetype_glyph: maxComponentDepth set to %d\n",
1630 recurse_count ));
1631 face->max_profile.maxComponentDepth = (
FT_UShort)recurse_count;
1632 }
1633
1634#ifndef FT_CONFIG_OPTION_INCREMENTAL
1635
1636 if ( glyph_index >= (
FT_UInt)
face->root.num_glyphs )
1637 {
1640 }
1641#endif
1642
1644
1646 {
1647 x_scale = 0x10000L;
1648 y_scale = 0x10000L;
1649 }
1650 else
1651 {
1654 }
1655
1656
1657
1658
1659
1660#ifdef FT_CONFIG_OPTION_INCREMENTAL
1661
1662
1663
1664
1665 if (
face->root.internal->incremental_interface )
1666 {
1667 error =
face->root.internal->incremental_interface->funcs->get_glyph_data(
1668 face->root.internal->incremental_interface->object,
1669 glyph_index, &glyph_data );
1672
1673 glyph_data_loaded = 1;
1676
1681
1682 loader->
stream = &inc_stream;
1683 }
1684 else
1685
1686#endif
1687
1690
1692 {
1693#ifdef FT_CONFIG_OPTION_INCREMENTAL
1694
1695 if ( !
face->glyf_offset &&
1696 !
face->root.internal->incremental_interface )
1697#else
1698 if ( !
face->glyf_offset )
1699#endif
1700 {
1701 FT_TRACE2((
"no `glyf' table but non-zero `loca' entry\n" ));
1704 }
1705
1706 error =
face->access_glyph_frame( loader, glyph_index,
1711
1712
1713 error =
face->read_glyph_header( loader );
1714
1715 face->forget_glyph_frame( loader );
1716
1719 }
1720
1721
1723 {
1728 }
1729
1730
1731
1732
1736
1737 if ( header_only )
1739
1741 {
1742
1743
1745
1746#ifdef FT_CONFIG_OPTION_INCREMENTAL
1747 tt_get_metrics_incr_overrides( loader, glyph_index );
1748#endif
1749
1750#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
1751
1754 {
1755
1756
1758 char tags[4] = { 1, 1, 1, 1 };
1759 short contours[4] = { 0, 1, 2, 3 };
1761
1762
1763 FT_Vector unrounded[4] = { {0, 0}, {0, 0}, {0, 0}, {0, 0} };
1764
1765
1770
1775
1781
1782
1783 error = TT_Vary_Apply_Glyph_Deltas( loader->
face,
1784 glyph_index,
1786 unrounded,
1790
1795
1800
1801
1802
1805 unrounded[0].
x ) / 64;
1808 unrounded[2].
x ) / 64;
1809 }
1810
1811#endif
1812
1813
1814
1816 {
1819
1820
1825 }
1826
1829 }
1830
1831
1832
1834
1835#ifdef FT_CONFIG_OPTION_INCREMENTAL
1836 tt_get_metrics_incr_overrides( loader, glyph_index );
1837#endif
1838
1839
1840
1841
1842
1843
1844
1845 error =
face->access_glyph_frame( loader, glyph_index,
1850
1851 opened_frame = 1;
1852
1853
1854
1856 {
1857 error =
face->read_simple_glyph( loader );
1860
1861
1862 face->forget_glyph_frame( loader );
1863 opened_frame = 0;
1864
1868
1870 }
1871
1872
1873
1874
1875
1876
1878 {
1880
1884
1886
1887
1888
1890
1891
1892
1893
1894
1895
1896
1897
1898
1900 for ( node2 =
node; node2; node2 = node2->
next )
1902
1903
1906 {
1908 " infinite recursion detected\n" ));
1911 }
1912
1915
1916 else
1917 {
1922 }
1923
1926
1927
1928 error =
face->read_composite_glyph( loader );
1931
1932
1934
1935
1936 face->forget_glyph_frame( loader );
1937 opened_frame = 0;
1938
1939#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
1940
1943 {
1946
1950 short* contours =
NULL;
1952
1953
1955
1956
1957
1960
1964
1969 goto Exit1;
1970
1972
1973 for (
i = 0;
i <
limit;
i++, subglyph++ )
1974 {
1975
1976
1977
1982 }
1983
1988
1994
2000
2006
2010
2011
2012
2015 glyph_index,
2017 unrounded,
2019 goto Exit1;
2020
2022
2023 for (
i = 0;
i <
limit;
i++, subglyph++ )
2024 {
2026 {
2029 }
2030 }
2031
2036
2041
2042
2043
2047 unrounded[
outline.n_points - 4].x ) / 64;
2051 unrounded[
outline.n_points - 2].x ) / 64;
2052
2053 Exit1:
2058
2061 }
2062
2063#endif
2064
2065
2066
2068 {
2071
2072
2077 }
2078
2079
2080
2081
2083 {
2085 loader->
glyph->
format = FT_GLYPH_FORMAT_COMPOSITE;
2086
2088 }
2089
2090
2091
2092
2093
2094 {
2097
2098 FT_UInt num_points = start_point;
2101
2104
2105
2107
2108
2109 for (
n = 0;
n < num_subglyphs;
n++ )
2110 {
2112
2115
2116
2117
2118
2119
2120
2122
2123 pp[0] = loader->
pp1;
2124 pp[1] = loader->
pp2;
2125 pp[2] = loader->
pp3;
2126 pp[3] = loader->
pp4;
2127
2128 linear_hadvance = loader->
linear;
2129 linear_vadvance = loader->
vadvance;
2130
2132
2135 recurse_count + 1,
2139
2140
2142
2143
2145 {
2146 loader->
pp1 = pp[0];
2147 loader->
pp2 = pp[1];
2148 loader->
pp3 = pp[2];
2149 loader->
pp4 = pp[3];
2150
2151 loader->
linear = linear_hadvance;
2152 loader->
vadvance = linear_vadvance;
2153 }
2154
2156
2157 if ( num_points == num_base_points )
2158 continue;
2159
2160
2161
2162
2163
2164
2165
2166
2167
2169 subglyph,
2170 start_point,
2171 num_base_points );
2174 }
2175
2176 loader->
stream = old_stream;
2178
2179
2183 subglyph &&
2185#endif
2186 num_points > start_point )
2187 {
2189 start_point,
2190 start_contour );
2193 }
2194 }
2195
2196
2200 }
2201
2202
2203
2204
2205
2207
2208 if ( opened_frame )
2209 face->forget_glyph_frame( loader );
2210
2211#ifdef FT_CONFIG_OPTION_INCREMENTAL
2212
2213 if ( glyph_data_loaded )
2214 face->root.internal->incremental_interface->funcs->free_glyph_data(
2215 face->root.internal->incremental_interface->object,
2216 &glyph_data );
2217
2218#endif
2219
2221 }
#define FT_UINT_TO_POINTER(x)
unsigned short(__cdecl typeof(TIFFCurrentDirectory))(struct tiff *)
#define FT_LOAD_NO_RECURSE
#define FT_IS_VARIATION(face)
#define FT_IS_NAMED_INSTANCE(face)
#define FT_TRACE5(varformat)
#define FT_TRACE2(varformat)
#define FT_TRACE1(varformat)
FT_GlyphLoader_Add(FT_GlyphLoader loader)
#define FT_OUTLINE_OVERLAP
FT_BEGIN_HEADER FT_List_Find(FT_List list, void *data)
FT_List_Add(FT_List list, FT_ListNode node)
#define FT_NEW_ARRAY(ptr, count)
#define FT_SET_ERROR(expression)
#define TT_USE_BYTECODE_INTERPRETER
FT_Stream_OpenMemory(FT_Stream stream, const FT_Byte *base, FT_ULong size)
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
GLint GLint GLint GLint GLint x
GLint GLint GLint GLint GLint GLint y
GLsizei const GLfloat * points
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
static char memory[1024 *256]
static FT_Error TT_Process_Composite_Glyph(TT_Loader loader, FT_UInt start_point, FT_UInt start_contour)
static FT_Error load_truetype_glyph(TT_Loader loader, FT_UInt glyph_index, FT_UInt recurse_count, FT_Bool header_only)
static FT_Error tt_get_metrics(TT_Loader loader, FT_UInt glyph_index)
static void tt_loader_set_pp(TT_Loader loader)
static FT_Error TT_Process_Simple_Glyph(TT_Loader loader)
static FT_Error TT_Process_Composite_Component(TT_Loader loader, FT_SubGlyph subglyph, FT_UInt start_point, FT_UInt num_base_points)
static FT_ListNode ft_list_get_node_at(FT_List list, FT_UInt idx)
#define ARGS_ARE_XY_VALUES
tt_face_get_location(TT_Face face, FT_UInt gindex, FT_UInt *asize)
#define TT_FACE_FLAG_VAR_HADVANCE
#define TT_FACE_FLAG_VAR_VADVANCE