fontsubset.hxx (161f4cd1) | fontsubset.hxx (248a599f) |
---|---|
1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 14 unchanged lines hidden (view full) --- 23 24#ifndef _SV_FONTSUBSET_HXX 25#define _SV_FONTSUBSET_HXX 26 27#include <tools/gen.hxx> 28#include <tools/string.hxx> 29#include <cstdio> 30 | 1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 14 unchanged lines hidden (view full) --- 23 24#ifndef _SV_FONTSUBSET_HXX 25#define _SV_FONTSUBSET_HXX 26 27#include <tools/gen.hxx> 28#include <tools/string.hxx> 29#include <cstdio> 30 |
31#include "salglyphid.hxx" |
|
31#include "vcl/dllapi.h" 32 33namespace vcl { struct _TrueTypeFont; } // SFT's idea of a TTF font 34 35class VCL_DLLPUBLIC FontSubsetInfo 36{ 37public: 38 explicit FontSubsetInfo( void ); --- 14 unchanged lines hidden (view full) --- 53 }; 54 55 bool LoadFont( FontType eInFontType, 56 const unsigned char* pFontBytes, int nByteLength ); 57 bool LoadFont( vcl::_TrueTypeFont* pSftTrueTypeFont ); 58 59 bool CreateFontSubset( int nOutFontTypeMask, 60 FILE* pOutFile, const char* pOutFontName, | 32#include "vcl/dllapi.h" 33 34namespace vcl { struct _TrueTypeFont; } // SFT's idea of a TTF font 35 36class VCL_DLLPUBLIC FontSubsetInfo 37{ 38public: 39 explicit FontSubsetInfo( void ); --- 14 unchanged lines hidden (view full) --- 54 }; 55 56 bool LoadFont( FontType eInFontType, 57 const unsigned char* pFontBytes, int nByteLength ); 58 bool LoadFont( vcl::_TrueTypeFont* pSftTrueTypeFont ); 59 60 bool CreateFontSubset( int nOutFontTypeMask, 61 FILE* pOutFile, const char* pOutFontName, |
61 const long* pReqGlyphIds, const sal_uInt8* pEncodedIds, | 62 const sal_GlyphId* pGlyphIds, const sal_uInt8* pEncodedIds, |
62 int nReqGlyphCount, sal_Int32* pOutGlyphWidths = NULL ); 63 64public: // TODO: make subsetter results private and provide accessor methods instead 65 // subsetter-provided subset details needed by e.g. Postscript or PDF 66 String m_aPSName; 67 int m_nAscent; // all metrics in PS font units 68 int m_nDescent; 69 int m_nCapHeight; --- 6 unchanged lines hidden (view full) --- 76 int mnInByteLength; 77 FontType meInFontType; // allowed mask of input font-types 78 vcl::_TrueTypeFont* mpSftTTFont; 79 80 // subset-request details 81 int mnReqFontTypeMask; // allowed subset-target font types 82 FILE* mpOutFile; 83 const char* mpReqFontName; | 63 int nReqGlyphCount, sal_Int32* pOutGlyphWidths = NULL ); 64 65public: // TODO: make subsetter results private and provide accessor methods instead 66 // subsetter-provided subset details needed by e.g. Postscript or PDF 67 String m_aPSName; 68 int m_nAscent; // all metrics in PS font units 69 int m_nDescent; 70 int m_nCapHeight; --- 6 unchanged lines hidden (view full) --- 77 int mnInByteLength; 78 FontType meInFontType; // allowed mask of input font-types 79 vcl::_TrueTypeFont* mpSftTTFont; 80 81 // subset-request details 82 int mnReqFontTypeMask; // allowed subset-target font types 83 FILE* mpOutFile; 84 const char* mpReqFontName; |
84 const long* mpReqGlyphIds; | 85 const sal_GlyphId* mpReqGlyphIds; |
85 const sal_uInt8* mpReqEncodedIds; 86 int mnReqGlyphCount; 87 88protected: 89 bool CreateFontSubsetFromCff( sal_Int32* pOutGlyphWidths = NULL ); 90 bool CreateFontSubsetFromSfnt( sal_Int32* pOutGlyphWidths = NULL ); 91 bool CreateFontSubsetFromType1( sal_Int32* pOutGlyphWidths = NULL ); 92}; 93 94#endif // _SV_FONTSUBSET_HXX 95 | 86 const sal_uInt8* mpReqEncodedIds; 87 int mnReqGlyphCount; 88 89protected: 90 bool CreateFontSubsetFromCff( sal_Int32* pOutGlyphWidths = NULL ); 91 bool CreateFontSubsetFromSfnt( sal_Int32* pOutGlyphWidths = NULL ); 92 bool CreateFontSubsetFromType1( sal_Int32* pOutGlyphWidths = NULL ); 93}; 94 95#endif // _SV_FONTSUBSET_HXX 96 |