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

Side by Side Diff: third_party/sfntly/src/subsetter/subsetter_impl.h

Issue 7381004: Add sfntly library for font subsetting used in print preview. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 5 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 /*
2 * Copyright 2011 Google Inc. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17 #ifndef SUBSETTER_IMPL_H_
18 #define SUBSETTER_IMPL_H_
19
20 #include "sfntly/font.h"
21 #include "sfntly/font_factory.h"
22
23 namespace sfntly {
24
25 class SubsetterImpl : public RefCounted<SubsetterImpl> {
26 public:
27 SubsetterImpl();
28 ~SubsetterImpl();
29
30 bool loadFont(const char* font_name,
31 const unsigned char* original_font,
32 const size_t font_size);
33 int subsetFont(const unsigned int* glyph_ids,
34 const size_t glyph_count,
35 unsigned char** output_buffer);
36
37 private:
38 Font* findFont(const char* font_name, FontArray& font_array);
39 bool hasName(const char* font_name, Font* font);
40 CALLER_ATTACH Font* subset(const unsigned int* glyph_ids,
Sheridan Rawlins 2011/07/14 22:35:51 Can this be forward declared instead of included?
arthurhsu 2011/07/14 23:52:35 It accesses data member and has to be a member fun
41 const size_t glyph_count);
42
43 FontFactoryPtr factory_;
44 FontPtr font_;
45 };
46
47 }
48
49 #endif // SUBSETTER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698