diff options
author | Herb Derby <herb@google.com> | 2018-05-14 15:05:58 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-05-14 20:18:19 +0000 |
commit | 8fb2e5c3993fabfe25ba3f7c5ce2b92786c18c97 (patch) | |
tree | c4feea43c049c15ba78b1ddd2d704beac1484c74 /src/core/SkUtils.h | |
parent | 84f7c2b3c1a5a405f579ee0e34ebb82ab02de16e (diff) |
Centralize UTFN code point counting
Change-Id: Ifd6bdcb4ac88452ab01124777168b140cae965a9
Reviewed-on: https://skia-review.googlesource.com/128014
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Diffstat (limited to 'src/core/SkUtils.h')
-rw-r--r-- | src/core/SkUtils.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/SkUtils.h b/src/core/SkUtils.h index 9d7c64524f..6037b60c3c 100644 --- a/src/core/SkUtils.h +++ b/src/core/SkUtils.h @@ -11,6 +11,7 @@ #include "SkTypes.h" #include "SkMath.h" #include "SkOpts.h" +#include "SkTypeface.h" /** Similar to memset(), but it assigns a 16, 32, or 64-bit value into the buffer. @param buffer The memory to have value copied into it @@ -47,6 +48,7 @@ int SkUTF8_CountUnichars(const char utf8[]); int SkUTF8_CountUnichars(const void* utf8, size_t byteLength); int SkUTF16_CountUnichars(const void* utf16, size_t byteLength); int SkUTF32_CountUnichars(const void* utf32, size_t byteLength); +int SkUTFN_CountUnichars(SkTypeface::Encoding encoding, const void* utfN, size_t byteLength); /** This function is safe: invalid UTF8 sequences will return -1 * When -1 is returned, ptr is unchanged. |