/*
* 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.
*
*/
/*
*
* (C) Copyright IBM Corp. 1998-2013 - All Rights Reserved
*
*/
#include "LETypes.h"
#include "OpenTypeUtilities.h"
#include "LEFontInstance.h"
#include "OpenTypeTables.h"
#include "ICUFeatures.h"
#include "Lookups.h"
#include "ScriptAndLanguage.h"
#include "GlyphDefinitionTables.h"
#include "GlyphIterator.h"
#include "LookupProcessor.h"
#include "LEGlyphStorage.h"
#include "LESwaps.h"
le_uint32 LookupProcessor::applyLookupTable(const LEReferenceTo<LookupTable> &lookupTable, GlyphIterator *glyphIterator,
{
if (LE_FAILURE(success)) {
return 0;
}
LEReferenceTo<LookupSubtable> lookupSubtable = lookupTable->getLookupSubtable(lookupTable, subtable, success);
return 1;
}
}
return 1;
}
le_int32 LookupProcessor::process(LEGlyphStorage &glyphStorage, GlyphPositionAdjustments *glyphPositionAdjustments,
{
if (LE_FAILURE(success)) {
return 0;
}
if (lookupSelectArray == NULL) {
return glyphCount;
}
rightToLeft, 0, 0, glyphDefinitionTableHeader);
if (selectMask != 0) {
const LEReferenceTo<LookupTable> lookupTable = lookupListTable->getLookupTable(lookupListTable, lookup, success);
continue;
}
while (glyphIterator.findFeatureTag()) {
if (LE_FAILURE(success)) {
return 0;
}
}
}
}
return newGlyphCount;
}
le_uint32 LookupProcessor::applySingleLookup(le_uint16 lookupTableIndex, GlyphIterator *glyphIterator,
{
if (LE_FAILURE(success)) {
return 0;
}
const LEReferenceTo<LookupTable> lookupTable = lookupListTable->getLookupTable(lookupListTable, lookupTableIndex, success);
if (!lookupTable.isValid()) {
return 0;
}
return delta;
}
le_int32 LookupProcessor::selectLookups(const LEReferenceTo<FeatureTable> &featureTable, FeatureMask featureMask, le_int32 order, LEErrorCode &success)
{
LEReferenceToArrayOf<le_uint16> lookupListIndexArray(featureTable, success, featureTable->lookupListIndexArray, lookupCount);
if (lookupListIndex >= lookupSelectCount) {
continue;
}
}
}
LETag scriptTag, LETag languageTag, const FeatureMap *featureMap, le_int32 featureMapCount, le_bool orderFeatures,
{
if (LE_FAILURE(success)) {
return;
}
if (scriptListOffset != 0) {
}
}
if (featureListOffset != 0) {
}
if (lookupListOffset != 0) {
}
}
featureCount == 0 || lookupListCount == 0) {
return;
}
if(langSysTable.isValid()) {
}
if (lookupSelectArray == NULL) {
return;
}
for (int i = 0; i < lookupListCount; i += 1) {
lookupSelectArray[i] = 0;
}
// Count the total number of lookups referenced by all features. This will
// be the maximum number of entries in the lookupOrderArray. We can't use
// lookupListCount because some lookups might be referenced by more than
// one feature.
LEReferenceToArrayOf<le_uint16> featureIndexArray(langSysTable, success, langSysTable->featureIndexArray, featureCount);
featureTable = featureListTable->getFeatureTable(featureListTable, featureIndex, &featureTag, success);
continue;
}
}
}
return;
}
if (requiredFeatureIndex != 0xFFFF) {
requiredFeatureTable = featureListTable->getFeatureTable(featureListTable, requiredFeatureIndex, &requiredFeatureTag, success);
}
if (lookupOrderArray == NULL) {
return;
}
count = 0;
// If this is the required feature, add its lookups
}
if (orderFeatures) {
// If we added lookups from the required feature, sort them
if (count > 1) {
}
LEReferenceToArrayOf<le_uint16> featureIndexArray(langSysTable, success, langSysTable->featureIndexArray, featureCount);
// don't add the required feature to the list more than once...
// TODO: Do we need this check? (Spec. says required feature won't be in feature list...)
if (featureIndex == requiredFeatureIndex) {
continue;
}
featureTable = featureListTable->getFeatureTable(featureListTable, featureIndex, &featureTag, success);
}
}
if (count > 1) {
}
} else if(langSysTable.isValid()) {
LEReferenceToArrayOf<le_uint16> featureIndexArray(langSysTable, success, langSysTable->featureIndexArray, featureCount);
// don't add the required feature to the list more than once...
// NOTE: This check is commented out because the spec. says that
// the required feature won't be in the feature list, and because
// any duplicate entries will be removed below.
#if 0
if (featureIndex == requiredFeatureIndex) {
continue;
}
#endif
featureTable = featureListTable->getFeatureTable(featureListTable, featureIndex, &featureTag, success);
}
}
}
}
// If there's no specified feature order,
// we will apply the lookups in the order
// that they're in the font. If a particular
// lookup may be referenced by more than one feature,
// it will apprear in the lookupOrderArray more than
// once, so remove any duplicate entries in the sorted array.
}
out += 1;
}
}
}
}
{
}
{
}