0N/A/*
2362N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A *
0N/A * This code is free software; you can redistribute it and/or modify it
0N/A * under the terms of the GNU General Public License version 2 only, as
0N/A * published by the Free Software Foundation. Oracle designates this
2362N/A * particular file as subject to the "Classpath" exception as provided
0N/A * by Oracle in the LICENSE file that accompanied this code.
2362N/A *
0N/A * This code is distributed in the hope that it will be useful, but WITHOUT
0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A * version 2 for more details (a copy is included in the LICENSE file that
0N/A * accompanied this code).
0N/A *
0N/A * You should have received a copy of the GNU General Public License version
0N/A * 2 along with this work; if not, write to the Free Software Foundation,
0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A *
0N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2362N/A * or visit www.oracle.com if you need additional information or have any
2362N/A * questions.
2362N/A *
0N/A */
0N/A
0N/A/*
0N/A *
0N/A * (C) Copyright IBM Corp. 1998-2005 - All Rights Reserved
0N/A *
0N/A */
0N/A
0N/A#ifndef __LOOKUPS_H
0N/A#define __LOOKUPS_H
0N/A
0N/A/**
0N/A * \file
0N/A * \internal
0N/A */
0N/A
0N/A#include "LETypes.h"
0N/A#include "OpenTypeTables.h"
0N/A
0N/AU_NAMESPACE_BEGIN
0N/A
0N/Aenum LookupFlags
0N/A{
0N/A lfBaselineIsLogicalEnd = 0x0001, // The MS spec. calls this flag "RightToLeft" but this name is more accurate
0N/A lfIgnoreBaseGlyphs = 0x0002,
0N/A lfIgnoreLigatures = 0x0004,
0N/A lfIgnoreMarks = 0x0008,
0N/A lfReservedMask = 0x00F0,
0N/A lfMarkAttachTypeMask = 0xFF00,
0N/A lfMarkAttachTypeShift = 8
0N/A};
0N/A
0N/Astruct LookupSubtable
0N/A{
0N/A le_uint16 subtableFormat;
0N/A Offset coverageTableOffset;
0N/A
0N/A inline le_int32 getGlyphCoverage(const LEReferenceTo<LookupSubtable> &base, LEGlyphID glyphID, LEErrorCode &success) const;
0N/A
0N/A le_int32 getGlyphCoverage(const LEReferenceTo<LookupSubtable> &base, Offset tableOffset, LEGlyphID glyphID, LEErrorCode &success) const;
0N/A
0N/A // convenience
0N/A inline le_int32 getGlyphCoverage(const LETableReference &base, LEGlyphID glyphID, LEErrorCode &success) const;
0N/A
0N/A inline le_int32 getGlyphCoverage(const LETableReference &base, Offset tableOffset, LEGlyphID glyphID, LEErrorCode &success) const;
0N/A};
0N/A
0N/Astruct LookupTable
0N/A{
0N/A le_uint16 lookupType;
0N/A le_uint16 lookupFlags;
0N/A le_uint16 subTableCount;
0N/A Offset subTableOffsetArray[ANY_NUMBER];
2027N/A
0N/A const LEReferenceTo<LookupSubtable> getLookupSubtable(const LEReferenceTo<LookupTable> &base, le_uint16 subtableIndex, LEErrorCode &success) const;
0N/A};
0N/ALE_VAR_ARRAY(LookupTable, subTableOffsetArray)
0N/A
0N/Astruct LookupListTable
0N/A{
0N/A le_uint16 lookupCount;
0N/A Offset lookupTableOffsetArray[ANY_NUMBER];
0N/A
0N/A const LEReferenceTo<LookupTable> getLookupTable(const LEReferenceTo<LookupListTable> &base, le_uint16 lookupTableIndex, LEErrorCode &success) const;
0N/A};
0N/ALE_VAR_ARRAY(LookupListTable, lookupTableOffsetArray)
0N/A
0N/Ainline le_int32 LookupSubtable::getGlyphCoverage(const LEReferenceTo<LookupSubtable> &base, LEGlyphID glyphID, LEErrorCode &success) const
0N/A{
0N/A return getGlyphCoverage(base, coverageTableOffset, glyphID, success);
0N/A}
0N/A
0N/Ainline le_int32 LookupSubtable::getGlyphCoverage(const LETableReference &base, LEGlyphID glyphID, LEErrorCode &success) const {
0N/A LEReferenceTo<LookupSubtable> thisRef(base, success, this);
0N/A return getGlyphCoverage(thisRef, glyphID, success);
0N/A}
0N/A
0N/Ainline le_int32 LookupSubtable::getGlyphCoverage(const LETableReference &base, Offset tableOffset, LEGlyphID glyphID, LEErrorCode &success) const {
0N/A LEReferenceTo<LookupSubtable> thisRef(base, success, this);
0N/A return getGlyphCoverage(thisRef, tableOffset, glyphID, success);
0N/A}
0N/A
0N/AU_NAMESPACE_END
0N/A#endif
0N/A