| 1 |
/* |
| 2 |
* Copyright 2016 Google Inc. |
| 3 |
* |
| 4 |
* Use of this source code is governed by a BSD-style license that can be |
| 5 |
* found in the LICENSE file. |
| 6 |
*/ |
| 7 |
#ifndef SkPDFMakeToUnicodeCmap_DEFINED |
| 8 |
#define SkPDFMakeToUnicodeCmap_DEFINED |
| 9 |
|
| 10 |
#include "include/core/SkTypes.h" |
| 11 |
#include "src/core/SkTHash.h" |
| 12 |
|
| 13 |
#include <memory> |
| 14 |
|
| 15 |
class SkDynamicMemoryWStream; |
| 16 |
class SkPDFGlyphUse; |
| 17 |
class SkStreamAsset; |
| 18 |
class SkString; |
| 19 |
|
| 20 |
std::unique_ptr<SkStreamAsset> SkPDFMakeToUnicodeCmap( |
| 21 |
const SkUnichar* glyphToUnicode, |
| 22 |
const skia_private::THashMap<SkGlyphID, SkString>& glyphToUnicodeEx, |
| 23 |
const SkPDFGlyphUse* subset, |
| 24 |
bool multiByteGlyphs, |
| 25 |
SkGlyphID firstGlyphID, |
| 26 |
SkGlyphID lastGlyphID); |
| 27 |
|
| 28 |
// Exposed for unit testing. |
| 29 |
void SkPDFAppendCmapSections(const SkUnichar* glyphToUnicode, |
| 30 |
const skia_private::THashMap<SkGlyphID, SkString>& glyphToUnicodeEx, |
| 31 |
const SkPDFGlyphUse* subset, |
| 32 |
SkDynamicMemoryWStream* cmap, |
| 33 |
bool multiByteGlyphs, |
| 34 |
SkGlyphID firstGlyphID, |
| 35 |
SkGlyphID lastGlyphID); |
| 36 |
|
| 37 |
#endif // SkPDFMakeToUnicodeCmap_DEFINED |