Lines Matching refs:t
260 sal_Int16 t; in GetInt16() local
264 t = (ptr+offset)[0] << 8 | (ptr+offset)[1]; in GetInt16()
266 t = (ptr+offset)[1] << 8 | (ptr+offset)[0]; in GetInt16()
269 return t; in GetInt16()
274 sal_uInt16 t; in GetUInt16() local
278 t = (ptr+offset)[0] << 8 | (ptr+offset)[1]; in GetUInt16()
280 t = (ptr+offset)[1] << 8 | (ptr+offset)[0]; in GetUInt16()
283 return t; in GetUInt16()
288 sal_Int32 t; in GetInt32() local
292 t = (ptr+offset)[0] << 24 | (ptr+offset)[1] << 16 | in GetInt32()
295 t = (ptr+offset)[3] << 24 | (ptr+offset)[2] << 16 | in GetInt32()
299 return t; in GetInt32()
304 sal_uInt32 t; in GetUInt32() local
309 t = (ptr+offset)[0] << 24 | (ptr+offset)[1] << 16 | in GetUInt32()
312 t = (ptr+offset)[3] << 24 | (ptr+offset)[2] << 16 | in GetUInt32()
316 return t; in GetUInt32()
533 sal_uInt16 t, lastPoint=0; in GetSimpleTTOutline() local
558 if ((t = GetUInt16(ptr, 10+i*2, 1)) > lastPoint) lastPoint = t; in GetSimpleTTOutline()
783 F16Dot16 t; in GetCompoundTTOutline() local
786 …t = fixedMulDiv(a, nextComponent[i].x << 16, m) + fixedMulDiv(c, nextComponent[i].y << 16, m) + (e… in GetCompoundTTOutline()
787 cp.x = (sal_Int16)(fixedMul(t, m) >> 16); in GetCompoundTTOutline()
788 …t = fixedMulDiv(b, nextComponent[i].x << 16, n) + fixedMulDiv(d, nextComponent[i].y << 16, n) + (f… in GetCompoundTTOutline()
789 cp.y = (sal_Int16)(fixedMul(t, n) >> 16); in GetCompoundTTOutline()
1091 static void GetNames(TrueTypeFont *t) in GetNames() argument
1093 const sal_uInt8* table = getTable( t, O_name ); in GetNames()
1094 int nTableSize = getTableSize(t, O_name); in GetNames()
1113 t->psname = NULL; in GetNames()
1115 t->psname = nameExtract(table, nTableSize, r, 1, NULL); in GetNames()
1116 if ( ! t->psname && (r = findname(table, n, 1, 0, 0, 6)) != -1) in GetNames()
1117 t->psname = nameExtract(table, nTableSize, r, 0, NULL); in GetNames()
1118 if ( ! t->psname && (r = findname(table, n, 3, 0, 0x0409, 6)) != -1) in GetNames()
1121 t->psname = nameExtract(table, nTableSize, r, 1, NULL); in GetNames()
1124 if ( ! t->psname && (r = findname(table, n, 2, 2, 0, 6)) != -1) in GetNames()
1126 t->psname = nameExtract(table, nTableSize, r, 0, NULL); in GetNames()
1128 if ( ! t->psname ) in GetNames()
1130 if ( t->fname ) in GetNames()
1132 char* pReverse = t->fname + strlen(t->fname); in GetNames()
1134 while(pReverse != t->fname && *pReverse != '/') pReverse--; in GetNames()
1136 t->psname = strdup(pReverse); in GetNames()
1137 assert(t->psname != 0); in GetNames()
1138 for (i=strlen(t->psname) - 1; i > 0; i--) in GetNames()
1141 if (t->psname[i] == '.' ) { in GetNames()
1142 t->psname[i] = 0; in GetNames()
1148 t->psname = strdup( "Unknown" ); in GetNames()
1152 t->family = NULL; in GetNames()
1154 t->family = nameExtract(table, nTableSize, r, 1, &t->ufamily); in GetNames()
1155 if ( ! t->family && (r = findname(table, n, 3, 1, 0x0409, 1)) != -1) in GetNames()
1156 t->family = nameExtract(table, nTableSize, r, 1, &t->ufamily); in GetNames()
1157 if ( ! t->family && (r = findname(table, n, 1, 0, 0, 1)) != -1) in GetNames()
1158 t->family = nameExtract(table, nTableSize, r, 0, NULL); in GetNames()
1159 if ( ! t->family && (r = findname(table, n, 3, 1, 0x0411, 1)) != -1) in GetNames()
1160 t->family = nameExtract(table, nTableSize, r, 1, &t->ufamily); in GetNames()
1161 if ( ! t->family && (r = findname(table, n, 3, 0, 0x0409, 1)) != -1) in GetNames()
1162 t->family = nameExtract(table, nTableSize, r, 1, &t->ufamily); in GetNames()
1163 if ( ! t->family ) in GetNames()
1165 t->family = strdup(t->psname); in GetNames()
1166 assert(t->family != 0); in GetNames()
1169 t->subfamily = NULL; in GetNames()
1170 t->usubfamily = NULL; in GetNames()
1172 t->subfamily = nameExtract(table, nTableSize, r, 0, &t->usubfamily); in GetNames()
1173 if ( ! t->subfamily && (r = findname(table, n, 3, 1, 0x0409, 2)) != -1) in GetNames()
1174 t->subfamily = nameExtract(table, nTableSize, r, 1, &t->usubfamily); in GetNames()
1175 if ( ! t->subfamily ) in GetNames()
1177 t->subfamily = strdup(""); in GetNames()
1186 for( i = 0; t->psname[i] != 0 && bPSNameOK; i++ ) in GetNames()
1187 if( t->psname[ i ] < 33 || (t->psname[ i ] & 0x80) ) in GetNames()
1193 if( t->ufamily && t->family ) in GetNames()
1195 for( i = 0; t->ufamily[ i ] != 0 && bReplace; i++ ) in GetNames()
1196 if( t->ufamily[ i ] < 33 || t->ufamily[ i ] > 127 ) in GetNames()
1200 free( t->psname ); in GetNames()
1201 t->psname = strdup( t->family ); in GetNames()
1586 sal_uInt32 t; in KernGlyphsPrim2() local
1603 t = GetUInt32(ptr, k * 6, 1); in KernGlyphsPrim2()
1604 if (gpair >= t) l = k + 1; in KernGlyphsPrim2()
1605 if (gpair <= t) r = k - 1; in KernGlyphsPrim2()
1652 static int doOpenTTFont( sal_uInt32 facenum, TrueTypeFont* t );
1727 static int doOpenTTFont( sal_uInt32 facenum, TrueTypeFont* t ) in doOpenTTFont() argument
1734 sal_uInt32 version = GetInt32(t->ptr, 0, 1); in doOpenTTFont()
1741 if (GetUInt32(t->ptr, 4, 1) != 0x00010000) { in doOpenTTFont()
1742 CloseTTFont(t); in doOpenTTFont()
1745 if (facenum >= GetUInt32(t->ptr, 8, 1)) { in doOpenTTFont()
1746 CloseTTFont(t); in doOpenTTFont()
1749 tdoffset = GetUInt32(t->ptr, 12 + 4 * facenum, 1); in doOpenTTFont()
1751 CloseTTFont(t); in doOpenTTFont()
1760 t->tag = TTFontClassTag; in doOpenTTFont()
1762 t->ntables = GetUInt16(t->ptr + tdoffset, 4, 1); in doOpenTTFont()
1763 if( t->ntables >= 128 ) in doOpenTTFont()
1766 t->tables = (const sal_uInt8**)calloc(NUM_TAGS, sizeof(sal_uInt8*)); in doOpenTTFont()
1767 assert(t->tables != 0); in doOpenTTFont()
1768 t->tlens = (sal_uInt32*)calloc(NUM_TAGS, sizeof(sal_uInt32)); in doOpenTTFont()
1769 assert(t->tlens != 0); in doOpenTTFont()
1771 memset(t->tables, 0, NUM_TAGS * sizeof(void *)); in doOpenTTFont()
1772 memset(t->tlens, 0, NUM_TAGS * sizeof(sal_uInt32)); in doOpenTTFont()
1775 for (i=0; i<(int)t->ntables; i++) { in doOpenTTFont()
1777 tag = GetUInt32(t->ptr + tdoffset + 12, 16 * i, 1); in doOpenTTFont()
1800 sal_uInt32 nTableOffset = GetUInt32(t->ptr + tdoffset + 12, 16 * i + 8, 1); in doOpenTTFont()
1801 length = GetUInt32(t->ptr + tdoffset + 12, 16 * i + 12, 1); in doOpenTTFont()
1802 t->tables[nIndex] = t->ptr + nTableOffset; in doOpenTTFont()
1803 t->tlens[nIndex] = length; in doOpenTTFont()
1809 sal_uInt8* pHead = (sal_uInt8*)t->tables[O_head]; in doOpenTTFont()
1813 if( pHead > t->ptr + (t->fsize - 54) ) in doOpenTTFont()
1814 pHead = t->ptr + (t->fsize - 54); in doOpenTTFont()
1817 for( p = pHead + 12; p > t->ptr; --p ) { in doOpenTTFont()
1822 if( t->tables[j] ) in doOpenTTFont()
1823 *(char**)&t->tables[j] -= nDelta; in doOpenTTFont()
1827 if( p <= t->ptr ) in doOpenTTFont()
1839 if( (sal_uInt8*)t->tables[i] < t->ptr ) in doOpenTTFont()
1842 if( t->tables[i] ) in doOpenTTFont()
1843 …rr, "font file %s has bad table offset %d (tagnum=%d)\n", t->fname, (sal_uInt8*)t->tables[i]-t->pt… in doOpenTTFont()
1845 t->tlens[i] = 0; in doOpenTTFont()
1846 t->tables[i] = NULL; in doOpenTTFont()
1848 else if( (sal_uInt8*)t->tables[i] + t->tlens[i] > t->ptr + t->fsize ) in doOpenTTFont()
1850 int nMaxLen = (t->ptr + t->fsize) - (sal_uInt8*)t->tables[i]; in doOpenTTFont()
1853 t->tlens[i] = nMaxLen; in doOpenTTFont()
1855 fprintf( stderr, "font file %s has too big table (tagnum=%d)\n", t->fname, i ); in doOpenTTFont()
1867 …if( !(getTable(t, O_maxp) && getTable(t, O_head) && getTable(t, O_name) && getTable(t, O_cmap)) ) { in doOpenTTFont()
1868 CloseTTFont(t); in doOpenTTFont()
1872 const sal_uInt8* table = getTable(t, O_maxp); in doOpenTTFont()
1873 t->nglyphs = GetUInt16(table, 4, 1); in doOpenTTFont()
1875 table = getTable(t, O_head); in doOpenTTFont()
1876 t->unitsPerEm = GetUInt16(table, 18, 1); in doOpenTTFont()
1879 if( ((indexfmt != 0) && (indexfmt != 1)) || (t->unitsPerEm <= 0) ) { in doOpenTTFont()
1880 CloseTTFont(t); in doOpenTTFont()
1884 if( getTable(t, O_glyf) && getTable(t, O_loca) ) { /* TTF or TTF-OpenType */ in doOpenTTFont()
1885 k = (getTableSize(t, O_loca) / (indexfmt ? 4 : 2)) - 1; in doOpenTTFont()
1886 if( k < (int)t->nglyphs ) /* Hack for broken Chinese fonts */ in doOpenTTFont()
1887 t->nglyphs = k; in doOpenTTFont()
1889 table = getTable(t, O_loca); in doOpenTTFont()
1890 t->goffsets = (sal_uInt32 *) calloc(1+t->nglyphs, sizeof(sal_uInt32)); in doOpenTTFont()
1891 assert(t->goffsets != 0); in doOpenTTFont()
1893 for( i = 0; i <= (int)t->nglyphs; ++i ) in doOpenTTFont()
1894 …t->goffsets[i] = indexfmt ? GetUInt32(table, i << 2, 1) : (sal_uInt32)GetUInt16(table, i << 1, 1) … in doOpenTTFont()
1895 } else if( getTable(t, O_CFF) ) { /* PS-OpenType */ in doOpenTTFont()
1896 t->goffsets = (sal_uInt32 *) calloc(1+t->nglyphs, sizeof(sal_uInt32)); in doOpenTTFont()
1898 assert(t->goffsets != 0); in doOpenTTFont()
1900 CloseTTFont(t); in doOpenTTFont()
1904 table = getTable(t, O_hhea); in doOpenTTFont()
1905 t->numberOfHMetrics = (table != 0) ? GetUInt16(table, 34, 1) : 0; in doOpenTTFont()
1907 table = getTable(t, O_vhea); in doOpenTTFont()
1908 t->numOfLongVerMetrics = (table != 0) ? GetUInt16(table, 34, 1) : 0; in doOpenTTFont()
1910 GetNames(t); in doOpenTTFont()
1911 FindCmap(t); in doOpenTTFont()
1912 GetKern(t); in doOpenTTFont()
1913 ReadGSUB( t, 0, 0 ); in doOpenTTFont()