| 1 |
// Copyright 2018 Google LLC. |
| 2 |
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. |
| 3 |
#ifndef SkPDFSubsetFont_DEFINED |
| 4 |
#define SkPDFSubsetFont_DEFINED |
| 5 |
|
| 6 |
#include "include/core/SkData.h" // IWYU pragma: keep |
| 7 |
#include "include/core/SkRefCnt.h" |
| 8 |
|
| 9 |
class SkPDFGlyphUse; |
| 10 |
class SkTypeface; |
| 11 |
|
| 12 |
/** Subset the typeface's data to only include the glyphs used. |
| 13 |
* The glyph ids will remain the same. |
| 14 |
* |
| 15 |
* @return The subset font data, or nullptr if it cannot be subset. |
| 16 |
*/ |
| 17 |
sk_sp<SkData> SkPDFSubsetFont(const SkTypeface& typeface, const SkPDFGlyphUse& glyphUsage); |
| 18 |
|
| 19 |
#endif // SkPDFSubsetFont_DEFINED |