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

Side by Side Diff: third_party/sfntly/src/subsetter/font_subsetter.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 // Font subsetting API
Sheridan Rawlins 2011/07/14 22:35:51 nit: Move this down adjacent to function.
arthurhsu 2011/07/14 23:52:35 Done.
18 //
19 // Input TTF/TTC/OTF fonts, specify the glyph IDs to subset, and the subset font
20 // is returned in |output_buffer| (caller to delete[]). Return value is the
21 // length of output_buffer allocated.
22 //
23 // If subsetting failes, a negative value is returned. If none of the glyph IDs
24 // specified is found, the function will return 0.
25 //
26 // |font_name| Font name of the font, required for TTC files. If specified
27 // NULL, the first available font is selected.
28 // |original_font| Original font file contents.
29 // |font_size| Size of |original_font| in bytes.
30 // |glyph_ids| Glyph IDs to subset. If the specified glyph ID is not found
31 // in the font file, it will be ignored silently.
32 // |glyph_count| Number of glyph IDs in |glyph_ids|
33 // |output_buffer| Generated subset font.
34
35 #ifndef FONT_SUBSETTER_H_
36 #define FONT_SUBSETTER_H_
37
38 #include <cstddef>
39
40 extern int subsetFont(const char* font_name,
41 const unsigned char* original_font,
42 const size_t font_size,
43 const unsigned int* glyph_ids,
44 const size_t glyph_count,
45 unsigned char** output_buffer);
46
47 #endif // FONT_SUBSETTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698