diff options
author | Werner Lemberg <wl@gnu.org> | 2002-02-04 20:55:58 +0000 |
---|---|---|
committer | Werner Lemberg <wl@gnu.org> | 2002-02-04 20:55:58 +0000 |
commit | 0f7c2f1aa58c2251d6c1a3f388a50bfa97cb097f (patch) | |
tree | 7fb4c60ca8ca8dc4bde0661b7e490210555a122d /include | |
parent | 3604d5f5581bdf39d990dcc9b0e21a828dd0f24a (diff) |
Adding the function `FT_Get_Next_Char', doing the obvious thing
w.r.t. the selected charmap.
* include/freetype/freetype.h: Add prototype.
* include/freetype/internal/ftdriver.h: Add `FTDriver_getNextChar'
typedef.
(FT_Driver_Class): Use it.
* include/freetype/internal/psnames.h: Add `PS_Next_Unicode_Func'
typedef.
(PSNames_Interface): Use it.
* include/freetype/internal/tttypes.h: Add `TT_CharNext_Func'
typedef.
(TT_CMapTable): Use it.
* src/base/ftobjs.c (FT_Get_Next_Char): New function, implementing
high-level API.
* src/cff/cffdrivr.c (cff_get_next_char): New function.
(cff_driver_class): Add it.
* src/cid/cidriver.c (Cid_Get_Next_Char): New function.
(t1cid_driver_class): Add it.
* src/pcf/pcfdriver.c (PCF_Get_Next_Char): New function.
(pcf_driver_class): Add it.
* src/psnames/psmodule.c (PS_Next_Unicode): New function.
(psnames_interface): Add it.
* src/sfnt/ttcmap.c (code_to_next0, code_to_next2, code_to_next4,
code_to_next6, code_to_next_8_12, code_to_next_10): New auxiliary
functions.
(TT_CharMap_Load): Use them.
* src/truetype/ttdriver.c (Get_Next_Char): New function.
(tt_driver_class): Add it.
* src/type1/t1driver.c (Get_Next_Char): New function.
(t1_driver_class): Add it.
* src/winfnt/winfnt.c (FNT_Get_Next_Char): New function.
(winfnt_driver_class): Add it.
* src/pcf/pcfread.c (pcf_load_font): For now, report Unicode for
Unicode and Latin 1 encodings.
Diffstat (limited to 'include')
-rw-r--r-- | include/freetype/freetype.h | 22 | ||||
-rw-r--r-- | include/freetype/internal/ftdriver.h | 5 | ||||
-rw-r--r-- | include/freetype/internal/psnames.h | 5 | ||||
-rw-r--r-- | include/freetype/internal/tttypes.h | 5 |
4 files changed, 37 insertions, 0 deletions
diff --git a/include/freetype/freetype.h b/include/freetype/freetype.h index d4761a80..d6275a6e 100644 --- a/include/freetype/freetype.h +++ b/include/freetype/freetype.h @@ -122,6 +122,7 @@ FT_BEGIN_HEADER /* FT_Set_Transform */ /* FT_Load_Glyph */ /* FT_Get_Char_Index */ + /* FT_Get_Next_Char */ /* FT_Get_Name_Index */ /* FT_Load_Char */ /* */ @@ -2394,6 +2395,27 @@ FT_BEGIN_HEADER /*************************************************************************/ /* */ /* <Function> */ + /* FT_Get_Next_Char */ + /* */ + /* <Description> */ + /* Returns the next charcode that is defined in the charmap. */ + /* */ + /* <Input> */ + /* face :: A handle to the source face object. */ + /* */ + /* charcode :: The character code. */ + /* */ + /* <Return> */ + /* The charcode. 0 means `no encoded values above charcode'. */ + /* */ + FT_EXPORT( FT_ULong ) + FT_Get_Next_Char( FT_Face face, + FT_ULong charcode ); + + + /*************************************************************************/ + /* */ + /* <Function> */ /* FT_Get_Name_Index */ /* */ /* <Description> */ diff --git a/include/freetype/internal/ftdriver.h b/include/freetype/internal/ftdriver.h index 6d585734..d8c73d17 100644 --- a/include/freetype/internal/ftdriver.h +++ b/include/freetype/internal/ftdriver.h @@ -75,6 +75,10 @@ FT_BEGIN_HEADER (*FTDriver_getCharIndex)( FT_CharMap charmap, FT_Long charcode ); + typedef FT_Long + (*FTDriver_getNextChar)( FT_CharMap charmap, + FT_Long charcode ); + typedef FT_Error (*FTDriver_getKerning)( FT_Face face, FT_UInt left_glyph, @@ -189,6 +193,7 @@ FT_BEGIN_HEADER FTDriver_getAdvances get_advances; + FTDriver_getNextChar get_next_char; } FT_Driver_Class; diff --git a/include/freetype/internal/psnames.h b/include/freetype/internal/psnames.h index 71700c19..a70b7a90 100644 --- a/include/freetype/internal/psnames.h +++ b/include/freetype/internal/psnames.h @@ -166,6 +166,10 @@ FT_BEGIN_HEADER (*PS_Lookup_Unicode_Func)( PS_Unicodes* unicodes, FT_UInt unicode ); + typedef FT_ULong + (*PS_Next_Unicode_Func)( PS_Unicodes* unicodes, + FT_ULong unicode ); + /*************************************************************************/ /* */ @@ -221,6 +225,7 @@ FT_BEGIN_HEADER const unsigned short* adobe_std_encoding; const unsigned short* adobe_expert_encoding; + PS_Next_Unicode_Func next_unicode; } PSNames_Interface; diff --git a/include/freetype/internal/tttypes.h b/include/freetype/internal/tttypes.h index 4fc504fc..4177d1e3 100644 --- a/include/freetype/internal/tttypes.h +++ b/include/freetype/internal/tttypes.h @@ -1049,6 +1049,10 @@ FT_BEGIN_HEADER (*TT_CharMap_Func)( TT_CMapTable* charmap, FT_ULong char_code ); + typedef FT_ULong + (*TT_CharNext_Func)( TT_CMapTable* charmap, + FT_ULong char_code ); + /* charmap table */ struct TT_CMapTable_ @@ -1072,6 +1076,7 @@ FT_BEGIN_HEADER } c; TT_CharMap_Func get_index; + TT_CharNext_Func get_next_char; }; |