/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
/*
* HangulLayoutEngine.cpp: OpenType processing for Han fonts.
*
* (C) Copyright IBM Corp. 1998-2010 - All Rights Reserved.
*/
#include "LETypes.h"
#include "LEScripts.h"
#include "LELanguages.h"
#include "LayoutEngine.h"
#include "OpenTypeLayoutEngine.h"
#include "HangulLayoutEngine.h"
#include "ScriptAndLanguageTags.h"
#include "LEGlyphStorage.h"
#include "OpenTypeTables.h"
// Character classes
enum
{
CC_L = 0,
CC_V,
CC_T,
CC_X,
};
// Action flags
// Actions
#define a_N 0
typedef struct
{
{
// L V T LV LVT X
};
{
};
#define nullFeatures 0
{
return 0;
}
tIndex = 0;
result = 2;
}
return result;
}
{
return 0;
}
if (trail == TJMO_FIRST) {
return 2;
}
return 3;
}
{
trail = TJMO_FIRST;
return CC_L;
}
return CC_V;
}
return CC_T;
}
if (c == 2) {
return CC_LV;
}
if (c == 3) {
return CC_LVT;
}
return CC_X;
}
HangulOpenTypeLayoutEngine::HangulOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 /*languageCode*/,
le_int32 typoFlags, const LEReferenceTo<GlyphSubstitutionTableHeader> &gsubTable, LEErrorCode &success)
{
}
HangulOpenTypeLayoutEngine::HangulOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 /*languageCode*/,
{
}
{
// nothing to do
}
le_int32 HangulOpenTypeLayoutEngine::characterProcessing(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft,
{
if (LE_FAILURE(success)) {
return 0;
}
return 0;
}
return 0;
}
if (LE_FAILURE(success)) {
return 0;
}
while (i < limit) {
while( i < limit) {
/* Any character of type X will be stored as a trail jamo */
}
} else {
/* Any Hangul will be fully decomposed. Output the decomposed characters. */
}
}
}
}
/* Negative next state means stop. */
if (state < 0) {
break;
}
i += 1;
}
/*
* See if the syllable can be composed into a single character. There are 5
* possible cases:
*
* Input Decomposed to Compose to
* LV L, V LV
* LVT L, V, T LVT
* L, V L, V LV, DEL
* LV, T L, V, T LVT, DEL
* L, V, T L, V, T LVT, DEL, DEL
*/
/*
* If the composition consumes the whole decomposed syllable,
* we can use it.
*/
/*
* Replace the rest of the input characters with DEL.
*/
}
}
}
}
return outCharCount;
}