1 /****************************************************************************\ 2 Part of the XeTeX typesetting system 3 Copyright (c) 1994-2008 by SIL International 4 Copyright (c) 2009 by Jonathan Kew 5 6 SIL Author(s): Jonathan Kew 7 8 Permission is hereby granted, free of charge, to any person obtaining 9 a copy of this software and associated documentation files (the 10 "Software"), to deal in the Software without restriction, including 11 without limitation the rights to use, copy, modify, merge, publish, 12 distribute, sublicense, and/or sell copies of the Software, and to 13 permit persons to whom the Software is furnished to do so, subject to 14 the following conditions: 15 16 The above copyright notice and this permission notice shall be 17 included in all copies or substantial portions of the Software. 18 19 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 22 NONINFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE 23 FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 24 CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 25 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 27 Except as contained in this notice, the name of the copyright holders 28 shall not be used in advertising or otherwise to promote the sale, 29 use or other dealings in this Software without prior written 30 authorization from the copyright holders. 31 \****************************************************************************/ 32 33 #ifndef __XETEX_FONT_MGR_FC_H 34 #define __XETEX_FONT_MGR_FC_H 35 36 #include "XeTeXFontMgr.h" 37 38 class XeTeXFontMgr_FC 39 : public XeTeXFontMgr 40 { 41 public: XeTeXFontMgr_FC()42 XeTeXFontMgr_FC() 43 { } ~XeTeXFontMgr_FC()44 virtual ~XeTeXFontMgr_FC() 45 { } 46 47 protected: 48 49 virtual void initialize(); 50 virtual void terminate(); 51 52 virtual void getOpSizeRecAndStyleFlags(Font* theFont); 53 virtual void searchForHostPlatformFonts(const std::string& name); 54 55 virtual NameCollection* readNames(FcPattern* pat); 56 57 std::string getPlatformFontDesc(PlatformFontRef font) const; 58 59 void cacheFamilyMembers(const std::list<std::string>& familyNames); 60 61 FcFontSet* allFonts; 62 bool cachedAll; 63 }; 64 65 #endif /* __XETEX_FONT_MGR_FC_H */ 66