ICU-8318 disable hebrew ligatures, add symbolic constants for typo flags
X-SVN-Rev: 29676
This commit is contained in:
parent
f00dd1eccb
commit
8235317928
@ -1,8 +1,5 @@
|
||||
|
||||
/*
|
||||
*
|
||||
* (C) Copyright IBM Corp. 1998-2009 - All Rights Reserved
|
||||
*
|
||||
* (C) Copyright IBM Corp. 1998-2011 - All Rights Reserved
|
||||
*/
|
||||
|
||||
#include "LETypes.h"
|
||||
@ -38,6 +35,9 @@ U_NAMESPACE_BEGIN
|
||||
/* Leave this copyright notice here! It needs to go somewhere in this library. */
|
||||
static const char copyright[] = U_COPYRIGHT_STRING;
|
||||
|
||||
const le_int32 LayoutEngine::kTypoFlagKern = 0x1;
|
||||
const le_int32 LayoutEngine::kTypoFlagLiga = 0x2;
|
||||
|
||||
const LEUnicode32 DefaultCharMapper::controlChars[] = {
|
||||
0x0009, 0x000A, 0x000D,
|
||||
/*0x200C, 0x200D,*/ 0x200E, 0x200F,
|
||||
@ -554,6 +554,11 @@ LayoutEngine *LayoutEngine::layoutEngineFactory(const LEFontInstance *fontInstan
|
||||
result = new ArabicOpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, gsubTable, success);
|
||||
break;
|
||||
|
||||
case hebrScriptCode:
|
||||
// Disable hebrew ligatures since they have only archaic uses, see ticket #8318
|
||||
result = new OpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags & ~kTypoFlagLiga, gsubTable, success);
|
||||
break;
|
||||
|
||||
case hangScriptCode:
|
||||
result = new HangulOpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, gsubTable, success);
|
||||
break;
|
||||
|
@ -1,8 +1,5 @@
|
||||
|
||||
/*
|
||||
*
|
||||
* (C) Copyright IBM Corp. 1998-2008 - All Rights Reserved
|
||||
*
|
||||
* (C) Copyright IBM Corp. 1998-2011 - All Rights Reserved
|
||||
*/
|
||||
|
||||
#ifndef __LAYOUTENGINE_H
|
||||
@ -65,6 +62,12 @@ class LEGlyphStorage;
|
||||
* @stable ICU 2.8
|
||||
*/
|
||||
class U_LAYOUT_API LayoutEngine : public UObject {
|
||||
public:
|
||||
/** Flag to request kerning. */
|
||||
static const le_int32 kTypoFlagKern;
|
||||
/** Flag to request ligatures. */
|
||||
static const le_int32 kTypoFlagLiga;
|
||||
|
||||
protected:
|
||||
/**
|
||||
* The object which holds the glyph storage
|
||||
@ -122,8 +125,8 @@ protected:
|
||||
* @param fontInstance - the font for the text
|
||||
* @param scriptCode - the script for the text
|
||||
* @param languageCode - the language for the text
|
||||
* @param typoFlags - the typographic control flags for the text. Set bit 1 if kerning
|
||||
* is desired, set bit 2 if ligature formation is desired. Others are reserved.
|
||||
* @param typoFlags - the typographic control flags for the text (a bitfield). Use kTypoFlagKern
|
||||
* if kerning is desired, kTypoFlagLiga if ligature formation is desired. Others are reserved.
|
||||
* @param success - set to an error code if the operation fails
|
||||
*
|
||||
* @see LEFontInstance
|
||||
@ -131,9 +134,9 @@ protected:
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
LayoutEngine(const LEFontInstance *fontInstance,
|
||||
le_int32 scriptCode,
|
||||
le_int32 languageCode,
|
||||
LayoutEngine(const LEFontInstance *fontInstance,
|
||||
le_int32 scriptCode,
|
||||
le_int32 languageCode,
|
||||
le_int32 typoFlags,
|
||||
LEErrorCode &success);
|
||||
|
||||
@ -493,4 +496,3 @@ public:
|
||||
|
||||
U_NAMESPACE_END
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user