Lines Matching refs:pFont

1329                 Type1FontFile* pFont = new Type1FontFile();  in analyzeFontFile()  local
1330 pFont->m_nDirectory = nDirID; in analyzeFontFile()
1332 pFont->m_aFontFile = rFontFile; in analyzeFontFile()
1333 pFont->m_aMetricFile = aAfmFile; in analyzeFontFile()
1335 if( ! pFont->readAfmMetrics( getAfmFile( pFont ), m_pAtoms, false, true ) ) in analyzeFontFile()
1337 delete pFont; in analyzeFontFile()
1338 pFont = NULL; in analyzeFontFile()
1340 if( pFont && rXLFDs.size() ) in analyzeFontFile()
1341 getFontAttributesFromXLFD( pFont, rXLFDs ); in analyzeFontFile()
1342 if( pFont ) in analyzeFontFile()
1343 rNewFonts.push_back( pFont ); in analyzeFontFile()
1353 BuiltinFont* pFont = new BuiltinFont(); in analyzeFontFile() local
1354 pFont->m_nDirectory = nDirID; in analyzeFontFile()
1355 pFont->m_aMetricFile = rFontFile; in analyzeFontFile()
1356 if( pFont->readAfmMetrics( aFilePath, m_pAtoms, false, true ) ) in analyzeFontFile()
1357 rNewFonts.push_back( pFont ); in analyzeFontFile()
1359 delete pFont; in analyzeFontFile()
1365 TrueTypeFontFile* pFont = new TrueTypeFontFile(); in analyzeFontFile() local
1366 pFont->m_nDirectory = nDirID; in analyzeFontFile()
1367 pFont->m_aFontFile = rFontFile; in analyzeFontFile()
1368 pFont->m_nCollectionEntry = -1; in analyzeFontFile()
1371 getFontAttributesFromXLFD( pFont, rXLFDs ); in analyzeFontFile()
1373 if( ! analyzeTrueTypeFile( pFont ) ) in analyzeFontFile()
1375 delete pFont; in analyzeFontFile()
1376 pFont = NULL; in analyzeFontFile()
1379 rNewFonts.push_back( pFont ); in analyzeFontFile()
1392 TrueTypeFontFile* pFont = new TrueTypeFontFile(); in analyzeFontFile() local
1393 pFont->m_nDirectory = nDirID; in analyzeFontFile()
1394 pFont->m_aFontFile = rFontFile; in analyzeFontFile()
1395 pFont->m_nCollectionEntry = i; in analyzeFontFile()
1397 getFontAttributesFromXLFD( pFont, rXLFDs ); in analyzeFontFile()
1398 if( ! analyzeTrueTypeFile( pFont ) ) in analyzeFontFile()
1400 delete pFont; in analyzeFontFile()
1401 pFont = NULL; in analyzeFontFile()
1404 rNewFonts.push_back( pFont ); in analyzeFontFile()
1448 … Type1FontFile* const pFont = static_cast< Type1FontFile* const >((*it).second); in findFontFileID() local
1449 if( pFont->m_nDirectory == nDirID && in findFontFileID()
1450 pFont->m_aFontFile == rFontFile ) in findFontFileID()
1456 … TrueTypeFontFile* const pFont = static_cast< TrueTypeFontFile* const >((*it).second); in findFontFileID() local
1457 if( pFont->m_nDirectory == nDirID && in findFontFileID()
1458 pFont->m_aFontFile == rFontFile ) in findFontFileID()
1585 void PrintFontManager::getFontAttributesFromXLFD( PrintFont* pFont, const std::list< OString >& rXL… in getFontAttributesFromXLFD() argument
1604 pFont->m_nFamilyName = nFam; in getFontAttributesFromXLFD()
1605 switch( pFont->m_eType ) in getFontAttributesFromXLFD()
1608 static_cast<Type1FontFile*>(pFont)->m_aXLFD = rXLFDs.front(); in getFontAttributesFromXLFD()
1611 static_cast<TrueTypeFontFile*>(pFont)->m_aXLFD = rXLFDs.front(); in getFontAttributesFromXLFD()
1620 if( nFam != pFont->m_nFamilyName ) in getFontAttributesFromXLFD()
1623 …for( al_it = pFont->m_aAliases.begin(); al_it != pFont->m_aAliases.end() && *al_it != nFam; ++al_i… in getFontAttributesFromXLFD()
1625 if( al_it == pFont->m_aAliases.end() ) in getFontAttributesFromXLFD()
1626 pFont->m_aAliases.push_back( nFam ); in getFontAttributesFromXLFD()
1635 pFont->m_eWeight = it->eWeight; in getFontAttributesFromXLFD()
1637 pFont->m_eItalic = it->eItalic; in getFontAttributesFromXLFD()
1639 pFont->m_eWidth = it->eWidth; in getFontAttributesFromXLFD()
1641 pFont->m_ePitch = it->ePitch; in getFontAttributesFromXLFD()
1643 pFont->m_aEncoding = it->aEncoding; in getFontAttributesFromXLFD()
1647 if( pFont->m_aEncoding == RTL_TEXTENCODING_ISO_8859_1 ) in getFontAttributesFromXLFD()
1648 pFont->m_aEncoding = RTL_TEXTENCODING_MS_1252; in getFontAttributesFromXLFD()
1651 switch( pFont->m_eType ) in getFontAttributesFromXLFD()
1654 static_cast<Type1FontFile*>(pFont)->m_aXLFD = rXLFDs.front(); in getFontAttributesFromXLFD()
1657 static_cast<TrueTypeFontFile*>(pFont)->m_aXLFD = rXLFDs.front(); in getFontAttributesFromXLFD()
1666 OString PrintFontManager::getXLFD( PrintFont* pFont ) const in getXLFD()
1668 if( pFont->m_eType == fonttype::Type1 ) in getXLFD()
1670 if( static_cast<Type1FontFile*>(pFont)->m_aXLFD.getLength() ) in getXLFD()
1671 return static_cast<Type1FontFile*>(pFont)->m_aXLFD; in getXLFD()
1673 if( pFont->m_eType == fonttype::TrueType ) in getXLFD()
1675 if( static_cast<TrueTypeFontFile*>(pFont)->m_aXLFD.getLength() ) in getXLFD()
1676 return static_cast<TrueTypeFontFile*>(pFont)->m_aXLFD; in getXLFD()
1682 …ByteString aFamily( String( m_pAtoms->getString( ATOM_FAMILYNAME, pFont->m_nFamilyName ) ), RTL_TE… in getXLFD()
1688 switch( pFont->m_eWeight ) in getXLFD()
1703 switch( pFont->m_eItalic ) in getXLFD()
1711 switch( pFont->m_eWidth ) in getXLFD()
1725 aXLFD.append( pFont->m_ePitch == pitch::Fixed ? "m" : "p" ); in getXLFD()
1727 const char* pEnc = rtl_getBestUnixCharsetFromTextEncoding( pFont->m_aEncoding ); in getXLFD()
1730 if( pFont->m_aEncoding == RTL_TEXTENCODING_ADOBE_STANDARD ) in getXLFD()
1860 bool PrintFontManager::analyzeTrueTypeFile( PrintFont* pFont ) const in analyzeTrueTypeFile()
1864 ByteString aFile = getFontFile( pFont ); in analyzeTrueTypeFile()
1867 TrueTypeFontFile* pTTFontFile = static_cast< TrueTypeFontFile* >(pFont); in analyzeTrueTypeFile()
1877 if( ! pFont->m_nFamilyName ) in analyzeTrueTypeFile()
1881pFont->m_nFamilyName = m_pAtoms->getAtom( ATOM_FAMILYNAME, aNames.front(), sal_True ); in analyzeTrueTypeFile()
1894pFont->m_nFamilyName = m_pAtoms->getAtom( ATOM_FAMILYNAME, OStringToOUString( pTTFontFile->m_aFont… in analyzeTrueTypeFile()
1902 if( nAlias != pFont->m_nFamilyName ) in analyzeTrueTypeFile()
1905 …for( al_it = pFont->m_aAliases.begin(); al_it != pFont->m_aAliases.end() && *al_it != nAlias; ++al… in analyzeTrueTypeFile()
1907 if( al_it == pFont->m_aAliases.end() ) in analyzeTrueTypeFile()
1908 pFont->m_aAliases.push_back( nAlias ); in analyzeTrueTypeFile()
1914 pFont->m_aStyleName = OUString( aInfo.usubfamily ); in analyzeTrueTypeFile()
1916pFont->m_nPSName = m_pAtoms->getAtom( ATOM_PSNAME, String( ByteString( aInfo.psname ), aEncoding )… in analyzeTrueTypeFile()
1919 case FW_THIN: pFont->m_eWeight = weight::Thin; break; in analyzeTrueTypeFile()
1920 case FW_EXTRALIGHT: pFont->m_eWeight = weight::UltraLight; break; in analyzeTrueTypeFile()
1921 case FW_LIGHT: pFont->m_eWeight = weight::Light; break; in analyzeTrueTypeFile()
1922 case FW_MEDIUM: pFont->m_eWeight = weight::Medium; break; in analyzeTrueTypeFile()
1923 case FW_SEMIBOLD: pFont->m_eWeight = weight::SemiBold; break; in analyzeTrueTypeFile()
1924 case FW_BOLD: pFont->m_eWeight = weight::Bold; break; in analyzeTrueTypeFile()
1925 case FW_EXTRABOLD: pFont->m_eWeight = weight::UltraBold; break; in analyzeTrueTypeFile()
1926 case FW_BLACK: pFont->m_eWeight = weight::Black; break; in analyzeTrueTypeFile()
1929 default: pFont->m_eWeight = weight::Normal; break; in analyzeTrueTypeFile()
1934 case FWIDTH_ULTRA_CONDENSED: pFont->m_eWidth = width::UltraCondensed; break; in analyzeTrueTypeFile()
1935 case FWIDTH_EXTRA_CONDENSED: pFont->m_eWidth = width::ExtraCondensed; break; in analyzeTrueTypeFile()
1936 case FWIDTH_CONDENSED: pFont->m_eWidth = width::Condensed; break; in analyzeTrueTypeFile()
1937 case FWIDTH_SEMI_CONDENSED: pFont->m_eWidth = width::SemiCondensed; break; in analyzeTrueTypeFile()
1938 case FWIDTH_SEMI_EXPANDED: pFont->m_eWidth = width::SemiExpanded; break; in analyzeTrueTypeFile()
1939 case FWIDTH_EXPANDED: pFont->m_eWidth = width::Expanded; break; in analyzeTrueTypeFile()
1940 case FWIDTH_EXTRA_EXPANDED: pFont->m_eWidth = width::ExtraExpanded; break; in analyzeTrueTypeFile()
1941 case FWIDTH_ULTRA_EXPANDED: pFont->m_eWidth = width::UltraExpanded; break; in analyzeTrueTypeFile()
1944 default: pFont->m_eWidth = width::Normal; break; in analyzeTrueTypeFile()
1947 pFont->m_ePitch = aInfo.pitch ? pitch::Fixed : pitch::Variable; in analyzeTrueTypeFile()
1948pFont->m_eItalic = aInfo.italicAngle == 0 ? italic::Upright : ( aInfo.italicAngle < 0 ? italic::It… in analyzeTrueTypeFile()
1952 pFont->m_eItalic = italic::Italic; in analyzeTrueTypeFile()
1954 pFont->m_aEncoding = aInfo.symbolEncoded ? RTL_TEXTENCODING_SYMBOL : RTL_TEXTENCODING_UCS2; in analyzeTrueTypeFile()
1956 pFont->m_aGlobalMetricY.width = pFont->m_aGlobalMetricX.width = aInfo.xMax - aInfo.xMin; in analyzeTrueTypeFile()
1957 pFont->m_aGlobalMetricY.height = pFont->m_aGlobalMetricX.height = aInfo.yMax - aInfo.yMin; in analyzeTrueTypeFile()
1961 pFont->m_nAscend = aInfo.winAscent; in analyzeTrueTypeFile()
1962 pFont->m_nDescend = aInfo.winDescent; in analyzeTrueTypeFile()
1963 pFont->m_nLeading = pFont->m_nAscend + pFont->m_nDescend - 1000; in analyzeTrueTypeFile()
1967 pFont->m_nLeading = aInfo.typoLineGap; in analyzeTrueTypeFile()
1968 pFont->m_nAscend = aInfo.typoAscender; in analyzeTrueTypeFile()
1969 pFont->m_nDescend = -aInfo.typoDescender; in analyzeTrueTypeFile()
1973 pFont->m_nLeading = aInfo.linegap; in analyzeTrueTypeFile()
1974 pFont->m_nAscend = aInfo.ascender; in analyzeTrueTypeFile()
1975 pFont->m_nDescend = -aInfo.descender; in analyzeTrueTypeFile()
1979 if( pFont->m_nAscend == 0 ) in analyzeTrueTypeFile()
1980 pFont->m_nAscend = aInfo.yMax; in analyzeTrueTypeFile()
1981 if( pFont->m_nDescend == 0 ) in analyzeTrueTypeFile()
1982 pFont->m_nDescend = -aInfo.yMin; in analyzeTrueTypeFile()
1983 if( pFont->m_nLeading == 0 ) in analyzeTrueTypeFile()
1984 pFont->m_nLeading = 15 * (pFont->m_nAscend+pFont->m_nDescend) / 100; in analyzeTrueTypeFile()
1986 if( pFont->m_nAscend ) in analyzeTrueTypeFile()
1987pFont->m_aGlobalMetricX.height = pFont->m_aGlobalMetricY.height = pFont->m_nAscend + pFont->m_nDes… in analyzeTrueTypeFile()
1990 pFont->m_nXMin = aInfo.xMin; in analyzeTrueTypeFile()
1991 pFont->m_nYMin = aInfo.yMin; in analyzeTrueTypeFile()
1992 pFont->m_nXMax = aInfo.xMax; in analyzeTrueTypeFile()
1993 pFont->m_nYMax = aInfo.yMax; in analyzeTrueTypeFile()
1999 pFont->m_bHaveVerticalSubstitutedGlyphs = DoesVerticalSubstitution( pTTFont, 1 ); in analyzeTrueTypeFile()
2546 PrintFont* pFont = it->second; in getFontList() local
2548 aBuiltinPSNames.find( pFont->m_nPSName ) != aBuiltinPSNames.end() ) in getFontList()
2554 … std::map<int,fontID>::const_iterator over = aOverridePSNames.find( pFont->m_nPSName ); in getFontList()
2567 m_pAtoms->getString( ATOM_FAMILYNAME, pFont->m_nFamilyName ), in getFontList()
2568 pFont->m_eItalic, in getFontList()
2569 pFont->m_eWeight, in getFontList()
2570 pFont->m_ePitch, in getFontList()
2571 pFont->m_aEncoding in getFontList()
2578 PrintFont* pFont = it->second; in getFontList() local
2581 if( aBuiltinPSNames.find( pFont->m_nPSName ) != aBuiltinPSNames.end() ) in getFontList()
2587 … std::map<int,fontID>::const_iterator over = aOverridePSNames.find( pFont->m_nPSName ); in getFontList()
2602 m_pAtoms->getString( ATOM_FAMILYNAME, pFont->m_nFamilyName ), in getFontList()
2603 pFont->m_eItalic, in getFontList()
2604 pFont->m_eWeight, in getFontList()
2605 pFont->m_ePitch, in getFontList()
2606 pFont->m_aEncoding in getFontList()
2622 void PrintFontManager::fillPrintFontInfo( PrintFont* pFont, FastPrintFontInfo& rInfo ) const in fillPrintFontInfo() argument
2625 m_aFamilyTypes.find( pFont->m_nFamilyName ); in fillPrintFontInfo()
2626 rInfo.m_eType = pFont->m_eType; in fillPrintFontInfo()
2627 rInfo.m_aFamilyName = m_pAtoms->getString( ATOM_FAMILYNAME, pFont->m_nFamilyName ); in fillPrintFontInfo()
2628 rInfo.m_aStyleName = pFont->m_aStyleName; in fillPrintFontInfo()
2630 rInfo.m_eItalic = pFont->m_eItalic; in fillPrintFontInfo()
2631 rInfo.m_eWidth = pFont->m_eWidth; in fillPrintFontInfo()
2632 rInfo.m_eWeight = pFont->m_eWeight; in fillPrintFontInfo()
2633 rInfo.m_ePitch = pFont->m_ePitch; in fillPrintFontInfo()
2634 rInfo.m_aEncoding = pFont->m_aEncoding; in fillPrintFontInfo()
2636 rInfo.m_bEmbeddable = (pFont->m_eType == fonttype::Type1); in fillPrintFontInfo()
2637 rInfo.m_bSubsettable = (pFont->m_eType == fonttype::TrueType); // TODO: rename to SfntType in fillPrintFontInfo()
2640 …for( ::std::list< int >::iterator it = pFont->m_aAliases.begin(); it != pFont->m_aAliases.end(); +… in fillPrintFontInfo()
2646 void PrintFontManager::fillPrintFontInfo( PrintFont* pFont, PrintFontInfo& rInfo ) const in fillPrintFontInfo() argument
2648 if( ( pFont->m_nAscend == 0 && pFont->m_nDescend == 0 ) || in fillPrintFontInfo()
2649 ! pFont->m_pMetrics || pFont->m_pMetrics->isEmpty() in fillPrintFontInfo()
2653 if( pFont->m_eType == fonttype::Type1 ) in fillPrintFontInfo()
2654 pFont->readAfmMetrics( getAfmFile( pFont ), m_pAtoms, false, false ); in fillPrintFontInfo()
2655 else if( pFont->m_eType == fonttype::TrueType ) in fillPrintFontInfo()
2656 analyzeTrueTypeFile( pFont ); in fillPrintFontInfo()
2659 fillPrintFontInfo( pFont, static_cast< FastPrintFontInfo& >( rInfo ) ); in fillPrintFontInfo()
2661 rInfo.m_nAscend = pFont->m_nAscend; in fillPrintFontInfo()
2662 rInfo.m_nDescend = pFont->m_nDescend; in fillPrintFontInfo()
2663 rInfo.m_nLeading = pFont->m_nLeading; in fillPrintFontInfo()
2664 …rInfo.m_nWidth = pFont->m_aGlobalMetricX.width < pFont->m_aGlobalMetricY.width ? pFont->m… in fillPrintFontInfo()
2707 PrintFont* pFont = getFont( nFontID ); in getFontInfo() local
2708 if( pFont ) in getFontInfo()
2711 fillPrintFontInfo( pFont, rInfo ); in getFontInfo()
2713 return pFont ? true : false; in getFontInfo()
2720 PrintFont* pFont = getFont( nFontID ); in getFontFastInfo() local
2721 if( pFont ) in getFontFastInfo()
2724 fillPrintFontInfo( pFont, rInfo ); in getFontFastInfo()
2726 return pFont ? true : false; in getFontFastInfo()
2734 PrintFont* pFont = getFont( nFontID ); in getFontBoundingBox() local
2735 if( pFont ) in getFontBoundingBox()
2737 … if( pFont->m_nXMin == 0 && pFont->m_nYMin == 0 && pFont->m_nXMax == 0 && pFont->m_nYMax == 0 ) in getFontBoundingBox()
2740 if( pFont->m_eType == fonttype::Type1 || pFont->m_eType == fonttype::Builtin ) in getFontBoundingBox()
2741 pFont->readAfmMetrics( getAfmFile( pFont ), m_pAtoms, false, true ); in getFontBoundingBox()
2742 else if( pFont->m_eType == fonttype::TrueType ) in getFontBoundingBox()
2743 analyzeTrueTypeFile( pFont ); in getFontBoundingBox()
2746 xMin = pFont->m_nXMin; in getFontBoundingBox()
2747 yMin = pFont->m_nYMin; in getFontBoundingBox()
2748 xMax = pFont->m_nXMax; in getFontBoundingBox()
2749 yMax = pFont->m_nYMax; in getFontBoundingBox()
2759 PrintFont* pFont = getFont( nFontID ); in getFontFaceNumber() local
2760 if( pFont && pFont->m_eType == fonttype::TrueType ) in getFontFaceNumber()
2761 nRet = static_cast< TrueTypeFontFile* >(pFont)->m_nCollectionEntry; in getFontFaceNumber()
2837 PrintFont* pFont = getFont( nFontID ); in getFontFamilyType() local
2838 if( !pFont ) in getFontFamilyType()
2842 m_aFamilyTypes.find( pFont->m_nFamilyName ); in getFontFamilyType()
2851 PrintFont* pFont = getFont( nFontID ); in getFontFamily() local
2852 return m_pAtoms->getString( ATOM_FAMILYNAME, pFont ? pFont->m_nFamilyName : INVALID_ATOM ); in getFontFamily()
2857 OString PrintFontManager::getAfmFile( PrintFont* pFont ) const in getAfmFile()
2860 if( pFont ) in getAfmFile()
2862 switch( pFont->m_eType ) in getAfmFile()
2866 Type1FontFile* pPSFont = static_cast< Type1FontFile* >(pFont); in getAfmFile()
2874 BuiltinFont* pBuiltinFont = static_cast< BuiltinFont* >(pFont); in getAfmFile()
2888 OString PrintFontManager::getFontFile( PrintFont* pFont ) const in getFontFile()
2892 if( pFont && pFont->m_eType == fonttype::Type1 ) in getFontFile()
2894 Type1FontFile* pPSFont = static_cast< Type1FontFile* >(pFont); in getFontFile()
2900 else if( pFont && pFont->m_eType == fonttype::TrueType ) in getFontFile()
2902 TrueTypeFontFile* pTTFont = static_cast< TrueTypeFontFile* >(pFont); in getFontFile()
2915 PrintFont* pFont = getFont( nFontID ); in getPSName() local
2916 if( pFont && pFont->m_nPSName == 0 ) in getPSName()
2918 if( pFont->m_eType == fonttype::TrueType ) in getPSName()
2919 analyzeTrueTypeFile( pFont ); in getPSName()
2922 return m_pAtoms->getString( ATOM_PSNAME, pFont ? pFont->m_nPSName : INVALID_ATOM ); in getPSName()
2930 PrintFont* pFont = getFont( nFontID ); in getGlobalFontMetric() local
2931 return pFont ? ( bHorizontal ? pFont->m_aGlobalMetricX : pFont->m_aGlobalMetricY ) : aMetric; in getGlobalFontMetric()
2938 PrintFont* pFont = getFont( nFontID ); in getFontAscend() local
2939 if( pFont->m_nAscend == 0 && pFont->m_nDescend == 0 ) in getFontAscend()
2942 if( pFont->m_eType == fonttype::TrueType ) in getFontAscend()
2943 analyzeTrueTypeFile( pFont ); in getFontAscend()
2944 else if( pFont->m_eType == fonttype::Type1 || pFont->m_eType == fonttype::Builtin ) in getFontAscend()
2945 pFont->readAfmMetrics( getAfmFile( pFont ), m_pAtoms, false, true ); in getFontAscend()
2947 return pFont->m_nAscend; in getFontAscend()
2954 PrintFont* pFont = getFont( nFontID ); in getFontDescend() local
2955 if( pFont->m_nAscend == 0 && pFont->m_nDescend == 0 ) in getFontDescend()
2958 if( pFont->m_eType == fonttype::TrueType ) in getFontDescend()
2959 analyzeTrueTypeFile( pFont ); in getFontDescend()
2960 else if( pFont->m_eType == fonttype::Type1 || pFont->m_eType == fonttype::Builtin ) in getFontDescend()
2961 pFont->readAfmMetrics( getAfmFile( pFont ), m_pAtoms, false, true ); in getFontDescend()
2963 return pFont->m_nDescend; in getFontDescend()
2970 PrintFont* pFont = getFont( nFontID ); in getFontLeading() local
2971 if( pFont->m_nAscend == 0 && pFont->m_nDescend == 0 ) in getFontLeading()
2974 if( pFont->m_eType == fonttype::TrueType ) in getFontLeading()
2975 analyzeTrueTypeFile( pFont ); in getFontLeading()
2977 return pFont->m_nLeading; in getFontLeading()
2984 PrintFont* pFont = getFont( nFontID ); in hasVerticalSubstitutions() local
2985 if( pFont->m_nAscend == 0 && pFont->m_nDescend == 0 ) in hasVerticalSubstitutions()
2988 if( pFont->m_eType == fonttype::TrueType ) in hasVerticalSubstitutions()
2989 analyzeTrueTypeFile( pFont ); in hasVerticalSubstitutions()
2991 return pFont->m_bHaveVerticalSubstitutedGlyphs; in hasVerticalSubstitutions()
2999 PrintFont* pFont = getFont( nFontID ); in hasVerticalSubstitutions() local
3000 if( pFont->m_nAscend == 0 && pFont->m_nDescend == 0 ) in hasVerticalSubstitutions()
3003 if( pFont->m_eType == fonttype::TrueType ) in hasVerticalSubstitutions()
3004 analyzeTrueTypeFile( pFont ); in hasVerticalSubstitutions()
3007 if( ! pFont->m_bHaveVerticalSubstitutedGlyphs ) in hasVerticalSubstitutions()
3014 if( ! pFont->m_pMetrics || in hasVerticalSubstitutions()
3015 ! ( pFont->m_pMetrics->m_aPages[ code >> 11 ] & ( 1 << ( ( code >> 8 ) & 7 ) ) ) ) in hasVerticalSubstitutions()
3016 pFont->queryMetricPage( code >> 8, m_pAtoms ); in hasVerticalSubstitutions()
3017 …::std::hash_map< sal_Unicode, bool >::const_iterator it = pFont->m_pMetrics->m_bVerticalSubstituti… in hasVerticalSubstitutions()
3018 pHasSubst[i] = it != pFont->m_pMetrics->m_bVerticalSubstitutions.end(); in hasVerticalSubstitutions()
3027 PrintFont* pFont = getFont( nFontID ); in getFontXLFD() local
3029 if( pFont ) in getFontXLFD()
3031 ByteString aXLFD( getXLFD( pFont ) ); in getFontXLFD()
3044 PrintFont* pFont = getFont( nFontID ); in getKernPairs() local
3045 if( ! pFont ) in getKernPairs()
3048 if( ! pFont->m_pMetrics || ! pFont->m_pMetrics->m_bKernPairsQueried ) in getKernPairs()
3049 pFont->queryMetricPage( 0, m_pAtoms ); in getKernPairs()
3050 if( ! pFont->m_pMetrics || ! pFont->m_pMetrics->m_bKernPairsQueried ) in getKernPairs()
3052 return bVertical ? pFont->m_pMetrics->m_aYKernPairs : pFont->m_pMetrics->m_aXKernPairs; in getKernPairs()
3064 PrintFont* pFont = getFont( nFont ); in isFontDownloadingAllowed() local
3065 if( pFont && pFont->m_eType == fonttype::TrueType ) in isFontDownloadingAllowed()
3067 TrueTypeFontFile* pTTFontFile = static_cast<TrueTypeFontFile*>(pFont); in isFontDownloadingAllowed()
3071 ByteString aFile = getFontFile( pFont ); in isFontDownloadingAllowed()
3097 PrintFont* pFont = getFont( nFontID ); in getMetrics() local
3098 if( ! pFont ) in getMetrics()
3101 if( ( pFont->m_nAscend == 0 && pFont->m_nDescend == 0 ) in getMetrics()
3102 || ! pFont->m_pMetrics || pFont->m_pMetrics->isEmpty() in getMetrics()
3106 if( pFont->m_eType == fonttype::Type1 || pFont->m_eType == fonttype::Builtin ) in getMetrics()
3107 pFont->readAfmMetrics( getAfmFile( pFont ), m_pAtoms, false, false ); in getMetrics()
3108 else if( pFont->m_eType == fonttype::TrueType ) in getMetrics()
3109 analyzeTrueTypeFile( pFont ); in getMetrics()
3114 if( ! pFont->m_pMetrics || in getMetrics()
3115 … ! ( pFont->m_pMetrics->m_aPages[ pString[i] >> 11 ] & ( 1 << ( ( pString[i] >> 8 ) & 7 ) ) ) ) in getMetrics()
3116 pFont->queryMetricPage( pString[i] >> 8, m_pAtoms ); in getMetrics()
3118 if( pFont->m_pMetrics ) in getMetrics()
3123 pFont->m_pMetrics->m_aMetrics.find( effectiveCode ); in getMetrics()
3125 if( bVertical && (it == pFont->m_pMetrics->m_aMetrics.end()) ) in getMetrics()
3126 it = pFont->m_pMetrics->m_aMetrics.find( pString[i] ); in getMetrics()
3128 if( it != pFont->m_pMetrics->m_aMetrics.end() ) in getMetrics()
3140 PrintFont* pFont = getFont( nFontID ); in getMetrics() local
3141 if( ! pFont ) in getMetrics()
3144 if( ( pFont->m_nAscend == 0 && pFont->m_nDescend == 0 ) in getMetrics()
3145 || ! pFont->m_pMetrics || pFont->m_pMetrics->isEmpty() in getMetrics()
3149 if( pFont->m_eType == fonttype::Type1 || pFont->m_eType == fonttype::Builtin ) in getMetrics()
3150 pFont->readAfmMetrics( getAfmFile( pFont ), m_pAtoms, false, false ); in getMetrics()
3151 else if( pFont->m_eType == fonttype::TrueType ) in getMetrics()
3152 analyzeTrueTypeFile( pFont ); in getMetrics()
3158 if( ! pFont->m_pMetrics || in getMetrics()
3159 ! ( pFont->m_pMetrics->m_aPages[ code >> 11 ] & ( 1 << ( ( code >> 8 ) & 7 ) ) ) ) in getMetrics()
3160 pFont->queryMetricPage( code >> 8, m_pAtoms ); in getMetrics()
3163 if( pFont->m_pMetrics ) in getMetrics()
3168 pFont->m_pMetrics->m_aMetrics.find( effectiveCode ); in getMetrics()
3170 if( bVertical && (it == pFont->m_pMetrics->m_aMetrics.end()) ) in getMetrics()
3171 it = pFont->m_pMetrics->m_aMetrics.find( code ); in getMetrics()
3173 if( it != pFont->m_pMetrics->m_aMetrics.end() ) in getMetrics()
3425 PrintFont* pFont = getFont( nFontID ); in changeFontProperties() local
3428 getFontAttributesFromXLFD( pFont, aDummyList ); in changeFontProperties()
3429 pFont->m_bUserOverride = true; in changeFontProperties()
3430 m_pFontCache->updateFontCacheEntry( pFont, true ); in changeFontProperties()
3453 PrintFont* pFont = aFonts.front(); in getImportableFontProperties() local
3456 fillPrintFontInfo( pFont, aInfo ); in getImportableFontProperties()
3458 delete pFont; in getImportableFontProperties()
3509 PrintFont* pFont = haveFont->second; in removeFonts() local
3511 ByteString aFile( getFontFile( pFont ) ); in removeFonts()
3528 OString aAfm( getAfmFile( pFont ) ); in removeFonts()
3537 delete pFont; in removeFonts()
3559 PrintFont* pFont = getFont( nFont ); in isPrivateFontFile() local
3560 if( pFont ) in isPrivateFontFile()
3562 switch( pFont->m_eType ) in isPrivateFontFile()
3564 case fonttype::Type1: nDirID = static_cast< Type1FontFile* >(pFont)->m_nDirectory;break; in isPrivateFontFile()
3565 … case fonttype::TrueType: nDirID = static_cast< TrueTypeFontFile* >(pFont)->m_nDirectory;break; in isPrivateFontFile()
3589 PrintFont* pFont = getFont( nFont ); in getAlternativeFamilyNames() local
3590 if( pFont && pFont->m_eType == fonttype::TrueType ) in getAlternativeFamilyNames()
3592 TrueTypeFontFile* pTTFontFile = static_cast< TrueTypeFontFile* >(pFont); in getAlternativeFamilyNames()
3593 ByteString aFile( getFontFile( pFont ) ); in getAlternativeFamilyNames()
3607 m_pAtoms->getAtom( ATOM_FAMILYNAME, aFamily, sal_True ) != pFont->m_nFamilyName in getAlternativeFamilyNames()
3636 PrintFont* pFont = getFont( nFont ); in createFontSubset() local
3637 if( !pFont ) in createFontSubset()
3640 switch( pFont->m_eType ) in createFontSubset()
3648 if( pFont->m_eType != fonttype::TrueType ) in createFontSubset()
3682 const ByteString aFromFile = getFontFile( pFont ); in createFontSubset()
3685 TrueTypeFontFile* pTTFontFile = static_cast< TrueTypeFontFile* >(pFont); in createFontSubset()
3771 PrintFont* pFont = getFont( nFont ); in getGlyphWidths() local
3772 if( !pFont || in getGlyphWidths()
3773 (pFont->m_eType != fonttype::TrueType && pFont->m_eType != fonttype::Type1) ) in getGlyphWidths()
3775 if( pFont->m_eType == fonttype::TrueType ) in getGlyphWidths()
3778 TrueTypeFontFile* pTTFontFile = static_cast< TrueTypeFontFile* >(pFont); in getGlyphWidths()
3779 ByteString aFromFile = getFontFile( pFont ); in getGlyphWidths()
3832 else if( pFont->m_eType == fonttype::Type1 ) in getGlyphWidths()
3834 if( ! pFont->m_aEncodingVector.size() ) in getGlyphWidths()
3835 pFont->readAfmMetrics( getAfmFile( pFont ), m_pAtoms, true, true ); in getGlyphWidths()
3836 if( pFont->m_pMetrics ) in getGlyphWidths()
3840 rWidths.reserve( pFont->m_pMetrics->m_aMetrics.size() ); in getGlyphWidths()
3842 pFont->m_pMetrics->m_aMetrics.begin(); in getGlyphWidths()
3843 it != pFont->m_pMetrics->m_aMetrics.end(); ++it ) in getGlyphWidths()
3859 PrintFont* pFont = getFont( nFont ); in getEncodingMap() local
3860 if( !pFont || in getEncodingMap()
3861 (pFont->m_eType != fonttype::Type1 && pFont->m_eType != fonttype::Builtin) in getEncodingMap()
3865 if( ! pFont->m_aEncodingVector.size() ) in getEncodingMap()
3866 pFont->readAfmMetrics( getAfmFile( pFont ), m_pAtoms, true, true ); in getEncodingMap()
3869 *pNonEncoded = pFont->m_aNonEncoded.size() ? &pFont->m_aNonEncoded : NULL; in getEncodingMap()
3871 return pFont->m_aEncodingVector.size() ? &pFont->m_aEncodingVector : NULL; in getEncodingMap()
3965 BuiltinFont* pFont = new BuiltinFont(); in readOverrideMetrics() local
3966 pFont->m_nDirectory = 0; in readOverrideMetrics()
3967 pFont->m_bUserOverride = false; in readOverrideMetrics()
3968 pFont->m_pMetrics = new PrintFontMetrics; in readOverrideMetrics()
3969 memset( pFont->m_pMetrics->m_aPages, 0xff, sizeof( pFont->m_pMetrics->m_aPages ) ); in readOverrideMetrics()
3970 pFont->m_pMetrics->m_bKernPairsQueried = true; in readOverrideMetrics()
3976 pFont->m_nFamilyName = m_pAtoms->getAtom( ATOM_FAMILYNAME, in readOverrideMetrics()
3980 pFont->m_nPSName = m_pAtoms->getAtom( ATOM_PSNAME, in readOverrideMetrics()
3984 pFont->m_aStyleName = getString(pProps[n].Value); in readOverrideMetrics()
3986 pFont->m_eItalic = static_cast<italic::type>(getInt(pProps[n].Value)); in readOverrideMetrics()
3988 pFont->m_eWidth = static_cast<width::type>(getInt(pProps[n].Value)); in readOverrideMetrics()
3990 pFont->m_eWeight = static_cast<weight::type>(getInt(pProps[n].Value)); in readOverrideMetrics()
3992 pFont->m_ePitch = static_cast<pitch::type>(getInt(pProps[n].Value)); in readOverrideMetrics()
3994 pFont->m_aEncoding = static_cast<rtl_TextEncoding>(getInt(pProps[n].Value)); in readOverrideMetrics()
3996 pFont->m_bFontEncodingOnly = getBool(pProps[n].Value); in readOverrideMetrics()
3998 pFont->m_aGlobalMetricX.width = getInt(pProps[n].Value); in readOverrideMetrics()
4000 pFont->m_aGlobalMetricX.height = getInt(pProps[n].Value); in readOverrideMetrics()
4002 pFont->m_aGlobalMetricY.width = getInt(pProps[n].Value); in readOverrideMetrics()
4004 pFont->m_aGlobalMetricY.height = getInt(pProps[n].Value); in readOverrideMetrics()
4006 pFont->m_nAscend = getInt(pProps[n].Value); in readOverrideMetrics()
4008 pFont->m_nDescend = getInt(pProps[n].Value); in readOverrideMetrics()
4010 pFont->m_nLeading = getInt(pProps[n].Value); in readOverrideMetrics()
4012 pFont->m_nXMin = getInt(pProps[n].Value); in readOverrideMetrics()
4014 pFont->m_nYMin = getInt(pProps[n].Value); in readOverrideMetrics()
4016 pFont->m_nXMax = getInt(pProps[n].Value); in readOverrideMetrics()
4018 pFont->m_nYMax = getInt(pProps[n].Value); in readOverrideMetrics()
4020 pFont->m_bHaveVerticalSubstitutedGlyphs = getBool(pProps[n].Value); in readOverrideMetrics()
4031 pFont->m_aEncodingVector[ cCode ] = nGlyph; in readOverrideMetrics()
4044pFont->m_aNonEncoded[ cCode ] = OUStringToOString(aGlyphName,RTL_TEXTENCODING_ASCII_US); in readOverrideMetrics()
4057pFont->m_pMetrics->m_aMetrics[ pInts[m] ].width = static_cast<short int>(pInts[m+1]); in readOverrideMetrics()
4058pFont->m_pMetrics->m_aMetrics[ pInts[m] ].height = static_cast<short int>(pInts[m+2]); in readOverrideMetrics()
4079 pFont->m_pMetrics->m_aXKernPairs.push_back( aPair ); in readOverrideMetrics()
4085 if( pFont->m_nPSName && in readOverrideMetrics()
4086 pFont->m_nFamilyName && in readOverrideMetrics()
4087 ! pFont->m_pMetrics->m_aMetrics.empty() ) in readOverrideMetrics()
4090 m_aFonts[ m_nNextFontID++ ] = pFont; in readOverrideMetrics()
4095 delete pFont; in readOverrideMetrics()