1665 {
1670
1671#ifdef FT_DEBUG_LEVEL_TRACE
1673#endif
1674
1675
1676
1680
1682
1684 "Start charstring: get width\n" ));
1685
1686 zone->base = charstring_base;
1687 limit =
zone->limit = charstring_base + charstring_len;
1689
1690
1692 {
1696
1697
1698#ifdef FT_DEBUG_LEVEL_TRACE
1699 if ( bol )
1700 {
1703 }
1704#endif
1705
1706
1707
1708
1709
1710
1711
1712
1714 {
1715 case 1:
1716 case 3:
1717 case 4:
1718 case 5:
1719 case 6:
1720 case 7:
1721 case 8:
1722 case 9:
1723 case 10:
1724 case 11:
1725 case 14:
1726 case 15:
1727 case 21:
1728 case 22:
1729 case 30:
1730 case 31:
1731 goto No_Width;
1732
1733 case 13:
1735 break;
1736
1737 case 12:
1739 {
1740 FT_ERROR((
"t1_decoder_parse_metrics:"
1741 " invalid escape (12+EOF)\n" ));
1742 goto Syntax_Error;
1743 }
1744
1746 {
1747 case 7:
1749 break;
1750
1751 default:
1752 goto No_Width;
1753 }
1754 break;
1755
1756 case 255:
1758 {
1759 FT_ERROR((
"t1_decoder_parse_metrics:"
1760 " unexpected EOF in integer\n" ));
1761 goto Syntax_Error;
1762 }
1763
1764 value = (FT_Int32)( ( (FT_UInt32)
ip[0] << 24 ) |
1765 ( (FT_UInt32)
ip[1] << 16 ) |
1766 ( (FT_UInt32)
ip[2] << 8 ) |
1769
1770
1771
1772
1773
1774
1775
1776
1778 {
1779 FT_ERROR((
"t1_decoder_parse_metrics:"
1780 " large integer found for width\n" ));
1781 goto Syntax_Error;
1782 }
1783 else
1784 {
1785 value = (FT_Int32)( (FT_UInt32)
value << 16 );
1786 }
1787
1788 break;
1789
1790 default:
1792 {
1794 value = (FT_Int32)
ip[-1] - 139;
1795 else
1796 {
1798 {
1799 FT_ERROR((
"t1_decoder_parse_metrics:"
1800 " unexpected EOF in integer\n" ));
1801 goto Syntax_Error;
1802 }
1803
1805 value = ( (
ip[-2] - 247 ) * 256 ) +
ip[-1] + 108;
1806 else
1807 value = -( ( (
ip[-2] - 251 ) * 256 ) +
ip[-1] + 108 );
1808 }
1809
1810 value = (FT_Int32)( (FT_UInt32)
value << 16 );
1811 }
1812 else
1813 {
1814 FT_ERROR((
"t1_decoder_parse_metrics:"
1815 " invalid byte (%d)\n",
ip[-1] ));
1816 goto Syntax_Error;
1817 }
1818 }
1819
1820
1821
1822
1823
1824
1826 {
1828 {
1829 FT_ERROR((
"t1_decoder_parse_metrics: stack overflow\n" ));
1830 goto Syntax_Error;
1831 }
1832
1833#ifdef FT_DEBUG_LEVEL_TRACE
1835#endif
1836
1839 }
1840 else
1841 {
1843
1844
1846
1847 if (
top - decoder->
stack < num_args )
1848 goto Stack_Underflow;
1849
1850#ifdef FT_DEBUG_LEVEL_TRACE
1851
1852 if (
top - decoder->
stack != num_args )
1854 " too much operands on the stack"
1855 " (seen %d, expected %d)\n",
1857
1858#endif
1859
1861
1863 {
1866
1868
1871
1874
1875
1876
1877
1879
1882
1884
1889
1892
1893
1894
1895
1897
1898 default:
1899 FT_ERROR((
"t1_decoder_parse_metrics:"
1900 " unhandled opcode %d\n",
op ));
1901 goto Syntax_Error;
1902 }
1903
1904 }
1905
1906 }
1907
1909
1910 No_Width:
1911 FT_ERROR((
"t1_decoder_parse_metrics:"
1912 " no width, found op %d instead\n",
1914 Syntax_Error:
1916
1917 Stack_Underflow:
1918 return FT_THROW( Stack_Underflow );
1919 }
#define T1_MAX_CHARSTRINGS_OPERANDS
#define FT_ASSERT(condition)
#define FT_TRACE0(varformat)
#define FT_TRACE5(varformat)
#define FT_TRACE4(varformat)
FT_BEGIN_HEADER typedef unsigned char FT_Bool
GLdouble GLdouble GLdouble GLdouble top
T1_ParseState parse_state
T1_Decoder_ZoneRec zones[T1_MAX_SUBRS_CALLS+1]
FT_Long stack[T1_MAX_CHARSTRINGS_OPERANDS]
static const FT_Int t1_args_count[op_max]
enum T1_Operator_ T1_Operator