blob: ecb1b5a7fb03f586b64840ec4b35386ce5e1edfa [file] [log] [blame] [edit]
// Copyright 2018 Google LLC.
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
#ifndef SkPDFSubsetFont_DEFINED
#define SkPDFSubsetFont_DEFINED
#include "include/core/SkData.h" // IWYU pragma: keep
#include "include/core/SkRefCnt.h"
class SkPDFGlyphUse;
class SkTypeface;
/** Subset the typeface's data to only include the glyphs used.
* The glyph ids will remain the same.
*
* @return The subset font data, or nullptr if it cannot be subset.
*/
sk_sp<SkData> SkPDFSubsetFont(const SkTypeface& typeface, const SkPDFGlyphUse& glyphUsage);
bool SkPDFCanSubsetTableBasedFonts();
#endif // SkPDFSubsetFont_DEFINED