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

Side by Side Diff: third_party/harfbuzz/contrib/harfbuzz-unicode.h

Issue 12413010: Remove unused harfbuzz. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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 #ifndef SCRIPT_IDENTIFY_H_
2 #define SCRIPT_IDENTIFY_H_
3
4 #include <stdint.h>
5
6 #include <harfbuzz-shaper.h>
7
8 static const uint32_t HB_InvalidCodePoint = 0xffffffffu;
9
10 // -----------------------------------------------------------------------------
11 // Return the next Unicode code point from a UTF-16 vector
12 // chars: a pointer to @len words
13 // iter: (input/output) an index into @chars. This is updated.
14 // returns: HB_InvalidCodePoint on error and the code point otherwise.
15 // -----------------------------------------------------------------------------
16 uint32_t utf16_to_code_point(const uint16_t *chars, size_t len, ssize_t *iter);
17
18 // -----------------------------------------------------------------------------
19 // Like the above, except that the code points are traversed backwards. Thus,
20 // on the first call, |iter| should be |len| - 1.
21 // -----------------------------------------------------------------------------
22 uint32_t utf16_to_code_point(const uint16_t *chars, size_t len, ssize_t *iter);
23
24 // -----------------------------------------------------------------------------
25 // Return the script of the given code point
26 // -----------------------------------------------------------------------------
27 HB_Script code_point_to_script(uint32_t cp);
28
29 // -----------------------------------------------------------------------------
30 // Find the next script run in a UTF-16 string.
31 //
32 // A script run is a subvector of codepoints, all of which are in the same
33 // script. A run will never cut a surrogate pair in half at either end.
34 //
35 // num_code_points: (output, maybe NULL) the number of code points in the run
36 // output: (output) the @pos, @length and @script fields are set on success
37 // chars: the UTF-16 string
38 // len: the length of @chars, in words
39 // iter: (in/out) the current index into the string. This should be 0 for the
40 // first call and is updated on exit.
41 //
42 // returns: non-zero if a script run was found and returned.
43 // -----------------------------------------------------------------------------
44 char hb_utf16_script_run_next(unsigned *num_code_points, HB_ScriptItem *output,
45 const uint16_t *chars, size_t len, ssize_t *iter);
46
47 // -----------------------------------------------------------------------------
48 // This is the same as above, except that the input is traversed backwards.
49 // Thus, on the first call, |iter| should be |len| - 1.
50 // -----------------------------------------------------------------------------
51 char hb_utf16_script_run_prev(unsigned *num_code_points, HB_ScriptItem *output,
52 const uint16_t *chars, size_t len, ssize_t *iter);
53
54 #endif
OLDNEW
« no previous file with comments | « third_party/harfbuzz/contrib/harfbuzz-freetype.c ('k') | third_party/harfbuzz/contrib/harfbuzz-unicode.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698