xref: /aoo42x/main/vcl/aqua/source/gdi/atsfonts.hxx (revision 9930d4b4)
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
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 #ifndef _ATSFONTS_HXX
23 #define _ATSFONTS_HXX
24 
25 class ImplMacFontData;
26 class ImplDevFontList;
27 
28 #include <premac.h>
29 #include <ApplicationServices/ApplicationServices.h>
30 #include <postmac.h>
31 
32 #include <map>
33 
34 /* This class has the responsibility of assembling a list
35    of atsui compatible fonts available on the system and
36    enabling access to that list.
37  */
38 class SystemFontList
39 {
40 public:
41     SystemFontList();
42     ~SystemFontList();
43 
44     void AnnounceFonts( ImplDevFontList& ) const;
45     ImplMacFontData* GetFontDataFromId( ATSUFontID ) const;
46 
47     ATSUFontFallbacks maFontFallbacks;
48 
49 private:
50     typedef std::hash_map<ATSUFontID,ImplMacFontData*> MacFontContainer;
51     MacFontContainer maFontContainer;
52 
53     void InitGlyphFallbacks();
54 };
55 
56 #endif // _ATSFONTS_HXX
57 
58