Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(216)

Side by Side Diff: skia/ext/SkFontHost_fontconfig_impl.h

Issue 112074: Linux: Add support for chrooted renderers. (Closed)
Patch Set: Created 11 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 /* libs/graphics/ports/SkFontHost_fontconfig_impl.h
2 **
3 ** Copyright 2009, Google Inc.
4 **
5 ** Licensed under the Apache License, Version 2.0 (the "License");
6 ** you may not use this file except in compliance with the License.
7 ** You may obtain a copy of the License at
8 **
9 ** http://www.apache.org/licenses/LICENSE-2.0
10 **
11 ** Unless required by applicable law or agreed to in writing, software
12 ** distributed under the License is distributed on an "AS IS" BASIS,
13 ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 ** See the License for the specific language governing permissions and
15 ** limitations under the License.
16 */
17
18 /* The SkFontHost_fontconfig code requires an implementation of an abstact
19 * fontconfig interface. We do this because sometimes fontconfig is not
20 * directly availible and this provides an ability to change the fontconfig
21 * implementation at run-time.
22 */
23
24 #ifndef FontConfigInterface_DEFINED
25 #define FontConfigInterface_DEFINED
26
27 #include <string>
28
29 class FontConfigInterface {
30 public:
31 virtual ~FontConfigInterface() { }
32
33 /** Performs config match
34 *
35 * @param result_family (output) on success, the resulting family name.
36 * @param result_fileid (output) on success, the resulting file id.
37 * @param fileid_valid if true, then |fileid| is valid
38 * @param fileid the fileid (as returned by this function) which we are
39 * trying to match.
40 * @param family (optional) the family of the font that we are trying to
41 * match.
42 * @param is_bold (optional, set to -1 to ignore)
43 * @param is_italic (optional, set to -1 to ignore)
44 * @return true iff successful.
45 */
46 virtual bool Match(
47 std::string* result_family,
48 unsigned* result_fileid,
49 bool fileid_valid,
50 unsigned fileid,
51 const std::string& family,
52 int is_bold,
53 int is_italic) = 0;
54
55 /** Open a font file given the fileid as returned by Match
56 */
57 virtual int Open(unsigned fileid) = 0;
58 };
59
60 #endif // FontConfigInterface_DEFINED
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698