ICU-1253 This is the first version of a portable LayoutEngine

verification test

X-SVN-Rev: 6020
This commit is contained in:
Eric Mader 2001-10-03 21:48:10 +00:00
parent 1616010104
commit 4172495b11
17 changed files with 3226 additions and 0 deletions

View File

@ -0,0 +1,255 @@
/*
* %W% %E%
*
* (C) Copyright IBM Corp. 1998 - All Rights Reserved
*
* Portions Copyright 1998 by Sun Microsystems, Inc.,
* 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
* All rights reserved.
*
* This software is the confidential and proprietary information
* of Sun Microsystems, Inc. ("Confidential Information"). You
* shall not disclose such Confidential Information and shall use
* it only in accordance with the terms of the license agreement
* you entered into with Sun.
*
* The original version of this source code and documentation is
* copyrighted and owned by IBM. These materials are provided
* under terms of a License Agreement between IBM and Sun.
* This technology is protected by multiple US and International
* patents. This notice and attribution to IBM may not be removed.
*/
#include <stdio.h>
#include "LETypes.h"
#include "FontObject.h"
#include "LESwaps.h"
FontObject::FontObject(char *fileName)
: directory(NULL), numTables(0), searchRange(0),entrySelector(0),
cmapTable(NULL), cmSegCount(0), cmSearchRange(0), cmEntrySelector(0),
cmEndCodes(NULL), cmStartCodes(NULL), cmIdDelta(0), cmIdRangeOffset(0),
headTable(NULL), hmtxTable(NULL), numGlyphs(0), numOfLongHorMetrics(0), file(NULL)
{
file = fopen(fileName, "rb");
if (file == NULL) {
printf("?? Couldn't open %s", fileName);
return;
}
SFNTDirectory tempDir;
fread(&tempDir, sizeof tempDir, 1, file);
numTables = SWAPW(tempDir.numTables);
searchRange = SWAPW(tempDir.searchRange) >> 4;
entrySelector = SWAPW(tempDir.entrySelector);
rangeShift = SWAPW(tempDir.rangeShift) >> 4;
int dirSize = sizeof tempDir + ((numTables - ANY_NUMBER) * sizeof(DirectoryEntry));
directory = (SFNTDirectory *) new char[dirSize];
fseek(file, 0L, SEEK_SET);
fread(directory, sizeof(char), dirSize, file);
initUnicodeCMAP();
}
FontObject::~FontObject()
{
fclose(file);
delete[] directory;
delete[] cmapTable;
delete[] headTable;
delete[] hmtxTable;
}
void FontObject::deleteTable(void *table)
{
delete[] (char *) table;
}
DirectoryEntry *FontObject::findTable(LETag tag)
{
le_uint16 table = 0;
le_uint16 probe = 1 << entrySelector;
if (SWAPL(directory->tableDirectory[rangeShift].tag) <= tag) {
table = rangeShift;
}
while (probe > (1 << 0)) {
probe >>= 1;
if (SWAPL(directory->tableDirectory[table + probe].tag) <= tag) {
table += probe;
}
}
if (SWAPL(directory->tableDirectory[table].tag) == tag) {
return &directory->tableDirectory[table];
}
return NULL;
}
void *FontObject::readTable(LETag tag, le_uint32 *length)
{
DirectoryEntry *entry = findTable(tag);
if (entry == NULL) {
*length = 0;
return NULL;
}
*length = SWAPL(entry->length);
void *table = new char[*length];
fseek(file, SWAPL(entry->offset), SEEK_SET);
fread(table, sizeof(char), *length, file);
return table;
}
CMAPEncodingSubtable *FontObject::findCMAP(le_uint16 platformID, le_uint16 platformSpecificID)
{
LETag cmapTag = 0x636D6170; // 'cmap'
if (cmapTable == NULL) {
le_uint32 length;
cmapTable = (CMAPTable *) readTable(cmapTag, &length);
}
if (cmapTable != NULL) {
le_uint16 i;
le_uint16 nSubtables = SWAPW(cmapTable->numberSubtables);
for (i = 0; i < nSubtables; i += 1) {
CMAPEncodingSubtableHeader *esh = &cmapTable->encodingSubtableHeaders[i];
if (SWAPW(esh->platformID) == platformID &&
SWAPW(esh->platformSpecificID) == platformSpecificID) {
return (CMAPEncodingSubtable *) ((char *) cmapTable + SWAPL(esh->encodingOffset));
}
}
}
return NULL;
}
void FontObject::initUnicodeCMAP()
{
CMAPEncodingSubtable *encodingSubtable = findCMAP(3, 1);
if (encodingSubtable == 0 ||
SWAPW(encodingSubtable->format) != 4) {
printf("Can't find unicode 'cmap'");
return;
}
CMAPFormat4Encoding *header = (CMAPFormat4Encoding *) encodingSubtable;
cmSegCount = SWAPW(header->segCountX2) / 2;
cmSearchRange = SWAPW(header->searchRange);
cmEntrySelector = SWAPW(header->entrySelector);
cmRangeShift = SWAPW(header->rangeShift) / 2;
cmEndCodes = &header->endCodes[0];
cmStartCodes = &header->endCodes[cmSegCount + 1]; // + 1 for reservedPad...
cmIdDelta = &cmStartCodes[cmSegCount];
cmIdRangeOffset = &cmIdDelta[cmSegCount];
}
LEGlyphID FontObject::unicodeToGlyph(LEUnicode32 unicode32)
{
if (unicode32 >= 0x10000) {
return 0;
}
LEUnicode16 unicode = (LEUnicode16) unicode32;
le_uint16 index = 0;
le_uint16 probe = 1 << cmEntrySelector;
LEGlyphID result = 0;
if (SWAPW(cmStartCodes[cmRangeShift]) <= unicode) {
index = cmRangeShift;
}
while (probe > (1 << 0)) {
probe >>= 1;
if (SWAPW(cmStartCodes[index + probe]) <= unicode) {
index += probe;
}
}
if (unicode >= SWAPW(cmStartCodes[index]) && unicode <= SWAPW(cmEndCodes[index])) {
if (cmIdRangeOffset[index] == 0) {
result = (LEGlyphID) unicode;
} else {
le_uint16 offset = unicode - SWAPW(cmStartCodes[index]);
le_uint16 rangeOffset = SWAPW(cmIdRangeOffset[index]);
le_uint16 *glyphIndexTable = (le_uint16 *) ((char *) &cmIdRangeOffset[index] + rangeOffset);
result = SWAPW(glyphIndexTable[offset]);
}
result += SWAPW(cmIdDelta[index]);
} else {
result = 0;
}
return result;
}
le_uint16 FontObject::getUnitsPerEM()
{
if (headTable == NULL) {
LETag headTag = 0x68656164; // 'head'
le_uint32 length;
headTable = (HEADTable *) readTable(headTag, &length);
}
return SWAPW(headTable->unitsPerEm);
}
le_uint16 FontObject::getGlyphAdvance(LEGlyphID glyph)
{
if (hmtxTable == NULL) {
LETag maxpTag = 0x6D617870; // 'maxp'
LETag hheaTag = 0x68686561; // 'hhea'
LETag hmtxTag = 0x686D7478; // 'hmtx'
le_uint32 length;
HHEATable *hheaTable;
MAXPTable *maxpTable = (MAXPTable *) readTable(maxpTag, &length);
numGlyphs = SWAPW(maxpTable->numGlyphs);
deleteTable(maxpTable);
hheaTable = (HHEATable *) readTable(hheaTag, &length);
numOfLongHorMetrics = SWAPW(hheaTable->numOfLongHorMetrics);
deleteTable(hheaTable);
hmtxTable = (HMTXTable *) readTable(hmtxTag, &length);
}
le_uint16 index = glyph;
if (glyph >= numGlyphs) {
return 0;
}
if (glyph >= numOfLongHorMetrics) {
index = numOfLongHorMetrics - 1;
}
return SWAPW(hmtxTable->hMetrics[index].advanceWidth);
}

View File

@ -0,0 +1,249 @@
/*
* %W% %E%
*
* (C) Copyright IBM Corp. 1998 - All Rights Reserved
*
* Portions Copyright 1998 by Sun Microsystems, Inc.,
* 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
* All rights reserved.
*
* This software is the confidential and proprietary information
* of Sun Microsystems, Inc. ("Confidential Information"). You
* shall not disclose such Confidential Information and shall use
* it only in accordance with the terms of the license agreement
* you entered into with Sun.
*
* The original version of this source code and documentation is
* copyrighted and owned by IBM. These materials are provided
* under terms of a License Agreement between IBM and Sun.
* This technology is protected by multiple US and International
* patents. This notice and attribution to IBM may not be removed.
*/
#ifndef __FONTOBJECT_H
#define __FONTOBJECT_H
#include <stdio.h>
#include "LETypes.h"
#ifndef ANY_NUMBER
#define ANY_NUMBER 1
#endif
struct DirectoryEntry
{
le_uint32 tag;
le_uint32 checksum;
le_uint32 offset;
le_uint32 length;
};
struct SFNTDirectory
{
le_uint32 scalerType;
le_uint16 numTables;
le_uint16 searchRange;
le_uint16 entrySelector;
le_uint16 rangeShift;
DirectoryEntry tableDirectory[ANY_NUMBER];
};
struct CMAPEncodingSubtableHeader
{
le_uint16 platformID;
le_uint16 platformSpecificID;
le_uint32 encodingOffset;
};
struct CMAPTable
{
le_uint16 version;
le_uint16 numberSubtables;
CMAPEncodingSubtableHeader encodingSubtableHeaders[ANY_NUMBER];
};
struct CMAPEncodingSubtable
{
le_uint16 format;
le_uint16 length;
le_uint16 language;
};
struct CMAPFormat0Encoding : CMAPEncodingSubtable
{
le_uint8 glyphIndexArray[256];
};
struct CMAPFormat2Subheader
{
le_uint16 firstCode;
le_uint16 entryCount;
le_int16 idDelta;
le_uint16 idRangeOffset;
};
struct CMAPFormat2Encoding : CMAPEncodingSubtable
{
le_uint16 subHeadKeys[256];
CMAPFormat2Subheader subheaders[ANY_NUMBER];
};
struct CMAPFormat4Encoding : CMAPEncodingSubtable
{
le_uint16 segCountX2;
le_uint16 searchRange;
le_uint16 entrySelector;
le_uint16 rangeShift;
le_uint16 endCodes[ANY_NUMBER];
// le_uint16 reservedPad;
// le_uint16 startCodes[ANY_NUMBER];
// le_uint16 idDelta[ANY_NUMBER];
// le_uint16 idRangeOffset[ANY_NUMBER];
// le_uint16 glyphIndexArray[ANY_NUMBER];
};
struct CMAPFormat6Encoding : CMAPEncodingSubtable
{
le_uint16 firstCode;
le_uint16 entryCount;
le_uint16 glyphIndexArray[ANY_NUMBER];
};
typedef le_int32 fixed;
struct BigDate
{
le_uint32 bc;
le_uint32 ad;
};
struct HEADTable
{
fixed version;
fixed fontRevision;
le_uint32 checksumAdjustment;
le_uint32 magicNumber;
le_uint16 flags;
le_uint16 unitsPerEm;
BigDate created;
BigDate modified;
le_int16 xMin;
le_int16 yMin;
le_int16 xMax;
le_int16 yMax;
le_int16 lowestRecPPEM;
le_int16 fontDirectionHint;
le_int16 indexToLocFormat;
le_int16 glyphDataFormat;
};
struct MAXPTable
{
fixed version;
le_uint16 numGlyphs;
le_uint16 maxPoints;
le_uint16 maxContours;
le_uint16 maxComponentPoints;
le_uint16 maxComponentContours;
le_uint16 maxZones;
le_uint16 maxTwilightPoints;
le_uint16 maxStorage;
le_uint16 maxFunctionDefs;
le_uint16 maxInstructionDefs;
le_uint16 maxStackElements;
le_uint16 maxSizeOfInstructions;
le_uint16 maxComponentElements;
le_uint16 maxComponentDepth;
};
struct HHEATable
{
fixed version;
le_int16 ascent;
le_int16 descent;
le_int16 lineGap;
le_uint16 advanceWidthMax;
le_int16 minLeftSideBearing;
le_int16 minRightSideBearing;
le_int16 xMaxExtent;
le_int16 caretSlopeRise;
le_int16 caretSlopeRun;
le_int16 caretOffset;
le_int16 reserved1;
le_int16 reserved2;
le_int16 reserved3;
le_int16 reserved4;
le_int16 metricDataFormat;
le_uint16 numOfLongHorMetrics;
};
struct LongHorMetric
{
le_uint16 advanceWidth;
le_int16 leftSideBearing;
};
struct HMTXTable
{
LongHorMetric hMetrics[ANY_NUMBER]; // ANY_NUMBER = numOfLongHorMetrics from hhea table
// le_int16 leftSideBearing[ANY_NUMBER]; // ANY_NUMBER = numGlyphs - numOfLongHorMetrics
};
class FontObject
{
public:
FontObject(char *fontName);
~FontObject();
void *readTable(LETag tag, le_uint32 *length);
void deleteTable(void *table);
LEGlyphID unicodeToGlyph(LEUnicode32 unicode);
#if 0
le_uint32 unicodesToGlyphs(LEUnicode *chars, le_uint32 nChars, LEGlyphID *glyphs,
le_uint32 *charIndices, le_bool rightToLeft);
#endif
le_uint16 getUnitsPerEM();
le_uint16 getGlyphAdvance(LEGlyphID glyph);
private:
FontObject();
DirectoryEntry *findTable(LETag tag);
CMAPEncodingSubtable *findCMAP(le_uint16 platformID, le_uint16 platformSpecificID);
void initUnicodeCMAP();
SFNTDirectory *directory;
le_uint16 numTables;
le_uint16 searchRange;
le_uint16 entrySelector;
le_uint16 rangeShift;
CMAPTable *cmapTable;
le_uint16 cmSegCount;
le_uint16 cmSearchRange;
le_uint16 cmEntrySelector;
le_uint16 cmRangeShift;
le_uint16 *cmEndCodes;
le_uint16 *cmStartCodes;
le_uint16 *cmIdDelta;
le_uint16 *cmIdRangeOffset;
HEADTable *headTable;
HMTXTable *hmtxTable;
le_uint16 numGlyphs;
le_uint16 numOfLongHorMetrics;
FILE *file;
};
#endif

View File

@ -0,0 +1,95 @@
## Makefile.in for ICU - test/letest
## Copyright (c) 2001, International Business Machines Corporation and
## others. All Rights Reserved.
## Source directory information
srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = ../..
include $(top_builddir)/icudefs.mk
## Platform-specific setup
include @platform_make_fragment@
## Build directory information
subdir = test/letest
## Extra files to remove for 'make clean'
CLEANFILES = *~ $(DEPS)
## Target information
TESTTARGET = letest
GENTARGET = gendata
DEFS = @DEFS@
CPPFLAGS = @CPPFLAGS@ -I$(includedir) -I$(includedir)/layout
CFLAGS = @CFLAGS@
CXXFLAGS = @CXXFLAGS@
ENABLE_RPATH = @ENABLE_RPATH@
ifeq ($(ENABLE_RPATH),YES)
RPATHLDFLAGS = $(LD_RPATH)$(LD_RPATH_PRE)$(libdir)
endif
LDFLAGS = @LDFLAGS@ $(RPATHLDFLAGS)
INVOKE = $(LDLIBRARYPATH_ENVVAR)=$(top_builddir)/common:$(top_builddir)/i18n:$(top_builddir)/tools/toolutil:$$$(LDLIBRARYPATH_ENVVAR)
LIBS = $(LIBICULE) $(LIBICUUC) @LIBS@ @LIB_M@
COMMONOBJECTS = cmaps.o PortableFontInstance.o
TESTOBJECTS = testdata.o letest.o
GENOBJECTS = gendata.o
OBJECTS = $(COMMONOBJECTS) $(TESTOBJECTS) $(GENOBJECTS)
DEPS = $(OBJECTS:.o=.d)
## List of phony targets
.PHONY : all all-local install install-local clean clean-local \
distclean distclean-local dist dist-local check check-local
## Clear suffix list
.SUFFIXES :
## List of standard targets
all: all-local
install: install-local
clean: clean-local
distclean : distclean-local
dist: dist-local
check: all check-local
all-local: $(TESTTARGET)
install-local:
dist-local:
clean-local:
test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES)
$(RMV) $(OBJECTS) $(TARGET)
distclean-local: clean-local
$(RMV) Makefile
check-local: all-local
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) \
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
$(TESTTARGET) : $(COMMONOBJECTS) $(TESTOBJECTS)
$(LINK.cc) -o $@ $^ $(LIBS)
$(GENTARGET) : $(COMMONOBJECTS) $(GENOBJECTS)
$(LINK.cc) -o $@ $^ $(LIBS)
invoke:
ICU_DATA=$${ICU_DATA:-$(top_builddir)/data/} TZ=PST8PDT $(INVOKE) $(INVOCATION)
ifeq (,$(MAKECMDGOALS))
-include $(DEPS)
else
ifneq ($(patsubst %clean,,$(MAKECMDGOALS)),)
-include $(DEPS)
endif
endif

View File

@ -0,0 +1,286 @@
/*
* @(#)PortableFontInstance.cpp 1.2 99/12/14
*
* (C) Copyright IBM Corp. 1998 - All Rights Reserved
*
* Portions Copyright 1998 by Sun Microsystems, Inc.,
* 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
* All rights reserved.
*
* This software is the confidential and proprietary information
* of Sun Microsystems, Inc. ("Confidential Information"). You
* shall not disclose such Confidential Information and shall use
* it only in accordance with the terms of the license agreement
* you entered into with Sun.
*
* The original version of this source code and documentation is
* copyrighted and owned by IBM. These materials are provided
* under terms of a License Agreement between IBM and Sun.
* This technology is protected by multiple US and International
* patents. This notice and attribution to IBM may not be removed.
*/
#include <stdio.h>
#include "LETypes.h"
#include "LEFontInstance.h"
#include "LESwaps.h"
#include "PortableFontInstance.h"
#include "sfnt.h"
PortableFontInstance::PortableFontInstance(char *fileName, float pointSize, PFIErrorCode &status)
: fFile(NULL), fUnitsPerEM(0), fPointSize(pointSize), fDirectory(NULL), fCMAPMapper(NULL),
fHMTXTable(NULL), fNumGlyphs(0), fNumLongHorMetrics(0)
{
le_uint32 length;
if (LE_FAILURE(status)) {
return;
}
// open the font file
fFile = fopen(fileName, "rb");
if (fFile == NULL) {
status = PFI_FONT_FILE_NOT_FOUND_ERROR;
return;
}
// read in the directory
SFNTDirectory tempDir;
fread(&tempDir, sizeof tempDir, 1, fFile);
le_int32 dirSize = sizeof tempDir + ((SWAPW(tempDir.numTables) - ANY_NUMBER) * sizeof(DirectoryEntry));
const LETag headTag = 0x68656164; // 'head'
const HEADTable *headTable = NULL;
fDirectory = (const SFNTDirectory *) new char[dirSize];
if (fDirectory == NULL) {
status = PFI_OUT_OF_MEMORY_ERROR;
goto error_exit;
}
fseek(fFile, 0L, SEEK_SET);
fread((void *) fDirectory, sizeof(char), dirSize, fFile);
// read unitsPerEm from 'head' table
headTable = (const HEADTable *) readTable(headTag, &length);
if (headTable == NULL) {
status = PFI_MISSING_FONT_TABLE_ERROR;
goto error_exit;
}
fUnitsPerEM = (float) SWAPW(headTable->unitsPerEm);
deleteTable(headTable);
fCMAPMapper = findUnicodeMapper();
if (fCMAPMapper == NULL) {
status = PFI_MISSING_FONT_TABLE_ERROR;
goto error_exit;
}
return;
error_exit:
fclose(fFile);
fFile = NULL;
return;
}
PortableFontInstance::~PortableFontInstance()
{
if (fFile != NULL) {
fclose(fFile);
deleteTable(fHMTXTable);
delete fCMAPMapper;
}
};
void PortableFontInstance::deleteTable(const void *table) const
{
delete[] (char *) table;
}
const DirectoryEntry *PortableFontInstance::findTable(LETag tag) const
{
if (fDirectory != NULL) {
le_uint16 table = 0;
le_uint16 probe = 1 << SWAPW(fDirectory->entrySelector);
le_uint16 rangeShift = SWAPW(fDirectory->rangeShift) >> 4;
if (SWAPL(fDirectory->tableDirectory[rangeShift].tag) <= tag) {
table = rangeShift;
}
while (probe > (1 << 0)) {
probe >>= 1;
if (SWAPL(fDirectory->tableDirectory[table + probe].tag) <= tag) {
table += probe;
}
}
if (SWAPL(fDirectory->tableDirectory[table].tag) == tag) {
return &fDirectory->tableDirectory[table];
}
}
return NULL;
}
const void *PortableFontInstance::readTable(LETag tag, le_uint32 *length) const
{
const DirectoryEntry *entry = findTable(tag);
if (entry == NULL) {
*length = 0;
return NULL;
}
*length = SWAPL(entry->length);
void *table = new char[*length];
if (table != NULL) {
fseek(fFile, SWAPL(entry->offset), SEEK_SET);
fread(table, sizeof(char), *length, fFile);
}
return table;
}
CMAPMapper *PortableFontInstance::findUnicodeMapper()
{
le_uint32 length;
LETag cmapTag = 0x636D6170; // 'cmap'
const CMAPTable *cmap = (CMAPTable *) readTable(cmapTag, &length);
if (cmap == NULL) {
return NULL;
}
return CMAPMapper::createUnicodeMapper(cmap);
}
void PortableFontInstance::mapCharsToGlyphs(const LEUnicode chars[], le_int32 offset, le_int32 count, le_bool reverse, const LECharMapper *mapper, LEGlyphID glyphs[]) const
{
le_int32 i, out = 0, dir = 1;
if (reverse) {
out = count - 1;
dir = -1;
}
for (i = offset; i < offset + count; i += 1, out += dir) {
LEUnicode16 high = chars[i];
LEUnicode32 code = high;
if (i < offset + count - 1 && high >= 0xD800 && high <= 0xDBFF) {
LEUnicode16 low = chars[i + 1];
if (low >= 0xDC00 && low <= 0xDFFF) {
code = (high - 0xD800) * 0x400 + low - 0xDC00 + 0x10000;
}
}
glyphs[out] = mapCharToGlyph(code, mapper);
if (code >= 0x10000) {
i += 1;
glyphs[out += dir] = 0xFFFF;
}
}
}
LEGlyphID PortableFontInstance::mapCharToGlyph(LEUnicode32 ch, const LECharMapper *mapper) const
{
LEUnicode32 mappedChar = mapper->mapChar(ch);
if (mappedChar == 0xFFFF || mappedChar == 0xFFFE) {
return 0xFFFF;
}
if (mappedChar == 0x200C || mappedChar == 0x200D) {
return 1;
}
if (fCMAPMapper == NULL) {
return 0;
}
return fCMAPMapper->unicodeToGlyph(mappedChar);
}
void PortableFontInstance::getGlyphAdvance(LEGlyphID glyph, LEPoint &advance) const
{
if (fHMTXTable == NULL) {
LETag maxpTag = 0x6D617870; // 'maxp'
LETag hheaTag = 0x68686561; // 'hhea'
LETag hmtxTag = 0x686D7478; // 'hmtx'
le_uint32 length;
const HHEATable *hheaTable;
const MAXPTable *maxpTable = (MAXPTable *) readTable(maxpTag, &length);
PortableFontInstance *realThis = (PortableFontInstance *) this;
if (maxpTable != NULL) {
realThis->fNumGlyphs = SWAPW(maxpTable->numGlyphs);
deleteTable(maxpTable);
}
hheaTable = (HHEATable *) readTable(hheaTag, &length);
if (hheaTable != NULL) {
realThis->fNumLongHorMetrics = SWAPW(hheaTable->numOfLongHorMetrics);
deleteTable((void *) hheaTable);
}
realThis->fHMTXTable = (const HMTXTable *) readTable(hmtxTag, &length);
}
le_uint16 index = glyph;
if (glyph >= fNumGlyphs || fHMTXTable == NULL) {
advance.fX = advance.fY = 0;
return;
}
if (glyph >= fNumLongHorMetrics) {
index = fNumLongHorMetrics - 1;
}
advance.fX = xUnitsToPoints(SWAPW(fHMTXTable->hMetrics[index].advanceWidth));
advance.fY = 0;
}
le_bool PortableFontInstance::getGlyphPoint(LEGlyphID glyph, le_int32 pointNumber, LEPoint &point) const
{
#if 0
hsFixedPoint2 pt;
le_bool result;
result = fFontInstance->getGlyphPoint(glyph, pointNumber, pt);
if (result) {
point.fX = xUnitsToPoints(pt.fX);
point.fY = yUnitsToPoints(pt.fY);
}
return result;
#else
return false;
#endif
}
void PortableFontInstance::transformFunits(float xFunits, float yFunits, LEPoint &pixels) const
{
pixels.fX = xUnitsToPoints(xFunits);
pixels.fY = yUnitsToPoints(yFunits);
}

View File

@ -0,0 +1,161 @@
/*
* @(#)PortableFontInstance.h 1.1 99/11/22
*
* (C) Copyright IBM Corp. 1998 - All Rights Reserved
*
* Portions Copyright 1998 by Sun Microsystems, Inc.,
* 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
* All rights reserved.
*
* This software is the confidential and proprietary information
* of Sun Microsystems, Inc. ("Confidential Information"). You
* shall not disclose such Confidential Information and shall use
* it only in accordance with the terms of the license agreement
* you entered into with Sun.
*
* The original version of this source code and documentation is
* copyrighted and owned by IBM. These materials are provided
* under terms of a License Agreement between IBM and Sun.
* This technology is protected by multiple US and International
* patents. This notice and attribution to IBM may not be removed.
*/
#ifndef __PORTABLEFONTINSTANCE_H
#define __PORTABLEFONTINSTANCE_H
#include <stdio.h>
#include "LETypes.h"
#include "LEFontInstance.h"
#include "sfnt.h"
#include "cmaps.h"
enum PFIErrorCode {
PFI_NO_ERROR = 0,
PFI_FONT_FILE_NOT_FOUND_ERROR = 1,
PFI_MISSING_FONT_TABLE_ERROR = 2,
PFI_OUT_OF_MEMORY_ERROR = 3
};
#ifndef XP_CPLUSPLUS
typedef enum PFIErrorCode PFIErrorCode;
#endif
class PortableFontInstance : public LEFontInstance
{
private:
FILE *fFile;
float fUnitsPerEM;
float fPointSize;
const SFNTDirectory *fDirectory;
CMAPMapper *fCMAPMapper;
const HMTXTable *fHMTXTable;
le_uint16 fNumGlyphs;
le_uint16 fNumLongHorMetrics;
const DirectoryEntry *findTable(LETag tag) const;
const void *readTable(LETag tag, le_uint32 *length) const;
void deleteTable(const void *table) const;
CMAPMapper *PortableFontInstance::findUnicodeMapper();
public:
PortableFontInstance(char *fileName, float pointSize, PFIErrorCode &status);
virtual ~PortableFontInstance();
virtual const void *getFontTable(LETag tableTag) const
{
le_uint32 length;
return readTable(tableTag, &length);
};
virtual le_bool canDisplay(LEUnicode32 ch) const
{
return (le_bool) fCMAPMapper->unicodeToGlyph(ch) != 0;
};
virtual le_int32 getUnitsPerEM() const
{
return (le_int32) fUnitsPerEM;
};
virtual le_int32 getLineHeight() const
{
// this is a cheap hack!!
return (le_int32) fPointSize;
};
virtual void mapCharsToGlyphs(const LEUnicode chars[], le_int32 offset, le_int32 count, le_bool reverse, const LECharMapper *mapper, LEGlyphID glyphs[]) const;
virtual LEGlyphID mapCharToGlyph(LEUnicode32 ch, const LECharMapper *mapper) const;
virtual le_int32 getName(le_uint16 platformID, le_uint16 scriptID, le_uint16 languageID, le_uint16 nameID, LEUnicode *name) const
{
// This is only used for CDAC fonts, and we'll have to loose that support anyhow...
//return (le_int32) fFontObject->getName(platformID, scriptID, languageID, nameID, name);
if (name != NULL) {
*name = 0;
}
return 0;
};
virtual void getGlyphAdvance(LEGlyphID glyph, LEPoint &advance) const;
virtual le_bool getGlyphPoint(LEGlyphID glyph, le_int32 pointNumber, LEPoint &point) const;
float getXPixelsPerEm() const
{
return fPointSize;
};
float getYPixelsPerEm() const
{
return fPointSize;
};
float xUnitsToPoints(float xUnits) const
{
return (xUnits * fPointSize) / fUnitsPerEM;
};
float yUnitsToPoints(float yUnits) const
{
return (yUnits * fPointSize) / fUnitsPerEM;
};
void unitsToPoints(LEPoint &units, LEPoint &points) const
{
points.fX = xUnitsToPoints(units.fX);
points.fY = yUnitsToPoints(units.fY);
}
float xPixelsToUnits(float xPixels) const
{
return (xPixels * fUnitsPerEM) / fPointSize;
};
float yPixelsToUnits(float yPixels) const
{
return (yPixels * fUnitsPerEM) / fPointSize;
};
void pixelsToUnits(LEPoint &pixels, LEPoint &units) const
{
units.fX = xPixelsToUnits(pixels.fX);
units.fY = yPixelsToUnits(pixels.fY);
};
void transformFunits(float xFunits, float yFunits, LEPoint &pixels) const;
};
#endif

View File

@ -0,0 +1,212 @@
/*
* %W% %E%
*
* (C) Copyright IBM Corp. 1998 - All Rights Reserved
*
* Portions Copyright 1998 by Sun Microsystems, Inc.,
* 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
* All rights reserved.
*
* This software is the confidential and proprietary information
* of Sun Microsystems, Inc. ("Confidential Information"). You
* shall not disclose such Confidential Information and shall use
* it only in accordance with the terms of the license agreement
* you entered into with Sun.
*
* The original version of this source code and documentation is
* copyrighted and owned by IBM. These materials are provided
* under terms of a License Agreement between IBM and Sun.
* This technology is protected by multiple US and International
* patents. This notice and attribution to IBM may not be removed.
*/
#include "LETypes.h"
#include "LESwaps.h"
#include "sfnt.h"
#include "cmaps.h"
//
// Finds the high bit by binary searching
// through the bits in value.
//
le_int8 highBit(le_uint32 value)
{
le_uint8 bit = 0;
if (value >= 1 << 16) {
value >>= 16;
bit += 16;
}
if (value >= 1 << 8) {
value >>= 8;
bit += 8;
}
if (value >= 1 << 4) {
value >>= 4;
bit += 4;
}
if (value >= 1 << 2) {
value >>= 2;
bit += 2;
}
if (value >= 1 << 1) {
value >>= 1;
bit += 1;
}
return bit;
}
CMAPMapper *CMAPMapper::createUnicodeMapper(const CMAPTable *cmap)
{
le_uint16 i;
le_uint16 nSubtables = SWAPW(cmap->numberSubtables);
const CMAPEncodingSubtable *subtable = NULL;
le_uint32 offset1 = 0, offset10 = 0;
for (i = 0; i < nSubtables; i += 1) {
const CMAPEncodingSubtableHeader *esh = &cmap->encodingSubtableHeaders[i];
if (SWAPW(esh->platformID) == 3) {
switch (SWAPW(esh->platformSpecificID)) {
case 1:
offset1 = SWAPL(esh->encodingOffset);
break;
case 10:
offset10 = SWAPL(esh->encodingOffset);
break;
}
}
}
if (offset10 != 0)
{
subtable = (const CMAPEncodingSubtable *) ((const char *) cmap + offset10);
} else if (offset1 != 0) {
subtable = (const CMAPEncodingSubtable *) ((const char *) cmap + offset1);
} else {
return NULL;
}
switch (SWAPW(subtable->format)) {
case 4:
return new CMAPFormat4Mapper(cmap, (const CMAPFormat4Encoding *) subtable);
case 12:
{
const CMAPFormat12Encoding *encoding = (const CMAPFormat12Encoding *) subtable;
return new CMAPGroupMapper(cmap, encoding->groups, SWAPL(encoding->nGroups));
}
default:
break;
}
return NULL;
}
CMAPFormat4Mapper::CMAPFormat4Mapper(const CMAPTable *cmap, const CMAPFormat4Encoding *header)
: CMAPMapper(cmap)
{
le_uint16 segCount = SWAPW(header->segCountX2) / 2;
fEntrySelector = SWAPW(header->entrySelector);
fRangeShift = SWAPW(header->rangeShift) / 2;
fEndCodes = &header->endCodes[0];
fStartCodes = &header->endCodes[segCount + 1]; // + 1 for reservedPad...
fIdDelta = &fStartCodes[segCount];
fIdRangeOffset = &fIdDelta[segCount];
}
LEGlyphID CMAPFormat4Mapper::unicodeToGlyph(LEUnicode32 unicode32) const
{
if (unicode32 >= 0x10000) {
return 0;
}
LEUnicode16 unicode = (LEUnicode16) unicode32;
le_uint16 index = 0;
le_uint16 probe = 1 << fEntrySelector;
LEGlyphID result = 0;
if (SWAPW(fStartCodes[fRangeShift]) <= unicode) {
index = fRangeShift;
}
while (probe > (1 << 0)) {
probe >>= 1;
if (SWAPW(fStartCodes[index + probe]) <= unicode) {
index += probe;
}
}
if (unicode >= SWAPW(fStartCodes[index]) && unicode <= SWAPW(fEndCodes[index])) {
if (fIdRangeOffset[index] == 0) {
result = (LEGlyphID) unicode;
} else {
le_uint16 offset = unicode - SWAPW(fStartCodes[index]);
le_uint16 rangeOffset = SWAPW(fIdRangeOffset[index]);
le_uint16 *glyphIndexTable = (le_uint16 *) ((char *) &fIdRangeOffset[index] + rangeOffset);
result = SWAPW(glyphIndexTable[offset]);
}
result += SWAPW(fIdDelta[index]);
} else {
result = 0;
}
return result;
}
CMAPFormat4Mapper::~CMAPFormat4Mapper()
{
// parent destructor does it all
}
CMAPGroupMapper::CMAPGroupMapper(const CMAPTable *cmap, const CMAPGroup *groups, le_uint32 nGroups)
: CMAPMapper(cmap), fGroups(groups)
{
le_uint8 bit = highBit(nGroups);
fPower = 1 << bit;
fRangeOffset = nGroups - fPower;
}
LEGlyphID CMAPGroupMapper::unicodeToGlyph(LEUnicode32 unicode32) const
{
le_int32 probe = fPower;
le_int32 range = 0;
if (SWAPL(fGroups[fRangeOffset].startCharCode) <= unicode32) {
range = fRangeOffset;
}
while (probe > (1 << 0)) {
probe >>= 1;
if (SWAPL(fGroups[range + probe].startCharCode) <= unicode32) {
range += probe;
}
}
if (SWAPL(fGroups[range].startCharCode) <= unicode32 && SWAPL(fGroups[range].endCharCode) >= unicode32) {
return (LEGlyphID) (SWAPL(fGroups[range].startGlyphCode) + unicode32 - SWAPL(fGroups[range].startCharCode));
}
return 0;
}
CMAPGroupMapper::~CMAPGroupMapper()
{
// parent destructor does it all
}

View File

@ -0,0 +1,98 @@
/*
* %W% %E%
*
* (C) Copyright IBM Corp. 1998 - All Rights Reserved
*
* Portions Copyright 1998 by Sun Microsystems, Inc.,
* 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
* All rights reserved.
*
* This software is the confidential and proprietary information
* of Sun Microsystems, Inc. ("Confidential Information"). You
* shall not disclose such Confidential Information and shall use
* it only in accordance with the terms of the license agreement
* you entered into with Sun.
*
* The original version of this source code and documentation is
* copyrighted and owned by IBM. These materials are provided
* under terms of a License Agreement between IBM and Sun.
* This technology is protected by multiple US and International
* patents. This notice and attribution to IBM may not be removed.
*/
#ifndef __CMAPS_H
#define __CMAPS_H
#include "LETypes.h"
#include "sfnt.h"
class CMAPMapper
{
public:
virtual LEGlyphID unicodeToGlyph(LEUnicode32 unicode32) const = 0;
virtual ~CMAPMapper();
static CMAPMapper *createUnicodeMapper(const CMAPTable *cmap);
protected:
CMAPMapper(const CMAPTable *cmap);
CMAPMapper() {};
private:
const CMAPTable *fcmap;
};
class CMAPFormat4Mapper : public CMAPMapper
{
public:
CMAPFormat4Mapper(const CMAPTable *cmap, const CMAPFormat4Encoding *header);
virtual ~CMAPFormat4Mapper();
virtual LEGlyphID unicodeToGlyph(LEUnicode32 unicode32) const;
protected:
CMAPFormat4Mapper() {};
private:
le_uint16 fEntrySelector;
le_uint16 fRangeShift;
const le_uint16 *fEndCodes;
const le_uint16 *fStartCodes;
const le_uint16 *fIdDelta;
const le_uint16 *fIdRangeOffset;
};
class CMAPGroupMapper : public CMAPMapper
{
public:
CMAPGroupMapper(const CMAPTable *cmap, const CMAPGroup *groups, le_uint32 nGroups);
virtual ~CMAPGroupMapper();
virtual LEGlyphID unicodeToGlyph(LEUnicode32 unicode32) const;
protected:
CMAPGroupMapper() {};
private:
le_int32 fPower;
le_int32 fRangeOffset;
const CMAPGroup *fGroups;
};
inline CMAPMapper::CMAPMapper(const CMAPTable *cmap)
: fcmap(cmap)
{
// nothing else to do
}
inline CMAPMapper::~CMAPMapper()
{
delete[] (char *) fcmap;
}
#endif

View File

@ -0,0 +1,455 @@
/*
*******************************************************************************
*
* Copyright (C) 1999-2000, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
* file name: gendata.cpp
*
* created on: 11/03/2000
* created by: Eric R. Mader
*/
#include <stdio.h>
#include "unicode/utypes.h"
#include "unicode/unicode.h"
#include "unicode/locid.h"
#include "unicode/loengine.h"
#include "PortableFontInstance.h"
#define ARRAY_LENGTH(array) (sizeof array / sizeof array[0])
struct TestInput
{
char *fontName;
UChar *text;
int32_t textLength;
Unicode::EUnicodeScript scriptCode;
UBool rightToLeft;
};
/*
* FIXME: should use the output file name and the current date.
*/
char *header =
"/*\n"
" *******************************************************************************\n"
" *\n"
" * Copyright (C) 1999-2000, International Business Machines\n"
" * Corporation and others. All Rights Reserved.\n"
" *\n"
" * WARNING: THIS FILE IS MACHINE GENERATED. DO NOT HAND EDIT IT\n"
" * UNLESS YOU REALLY KNOW WHAT YOU'RE DOING.\n"
" *\n"
" *******************************************************************************\n"
" *\n"
" * file name: testdata.cpp\n"
" * created on: 12/14/2000\n"
" * created by: gendata.cpp\n"
" */\n"
"\n"
"#include \"unicode/utypes.h\"\n"
"#include \"unicode/unicode.h\"\n"
"#include \"letest.h\"\n"
"\n";
char *scriptNames[] =
{
"NOT-A-SCRIPT!",
"kBasicLatin",
"kLatin1Supplement",
"kLatinExtendedA",
"kLatinExtendedB",
"kIPAExtension",
"kSpacingModifier",
"kCombiningDiacritical",
"kGreek",
"kCyrillic",
"kArmenian",
"kHebrew",
"kArabic",
"kSyriac",
"kThaana",
"kDevanagari",
"kBengali",
"kGurmukhi",
"kGujarati",
"kOriya",
"kTamil",
"kTelugu",
"kKannada",
"kMalayalam",
"kSinhala",
"kThai",
"kLao",
"kTibetan",
"kMyanmar",
"kGeorgian",
"kHangulJamo",
"kEthiopic",
"kCherokee",
"kUnifiedCanadianAboriginalSyllabics",
"kogham",
"kRunic",
"kKhmer",
"kMongolian",
"kLatinExtendedAdditional",
"kGreekExtended",
"kGeneralPunctuation",
"kSuperSubScript",
"kCurrencySymbolScript",
"kSymbolCombiningMark",
"kLetterlikeSymbol",
"kNumberForm",
"kArrow",
"kMathOperator",
"kMiscTechnical",
"kControlPicture",
"kOpticalCharacter",
"kEnclosedAlphanumeric",
"kBoxDrawing",
"kBlockElement",
"kGeometricShape",
"kMiscSymbol",
"kDingbat",
"kBraillePatterns",
"kCJKRadicalsSupplement",
"kKangxiRadicals",
"kIdeographicDescriptionCharacters",
"kCJKSymbolPunctuation",
"kHiragana",
"kKatakana",
"kBopomofo",
"kHangulCompatibilityJamo",
"kKanbun",
"kBopomofoExtended",
"kEnclosedCJKLetterMonth",
"kCJKCompatibility",
"kCJKUnifiedIdeographExtensionA",
"kCJKUnifiedIdeograph",
"kYiSyllables",
"kYiRadicals",
"kHangulSyllable",
"kHighSurrogate",
"kHighPrivateUseSurrogate",
"kLowSurrogate",
"kPrivateUse",
"kCJKCompatibilityIdeograph",
"kAlphabeticPresentation",
"kArabicPresentationA",
"kCombiningHalfMark",
"kCJKCompatibilityForm",
"kSmallFormVariant",
"kArabicPresentationB",
"kNoScript",
"kHalfwidthFullwidthForm"
};
UChar devaText[] =
{
0x0936, 0x094d, 0x0930, 0x0940, 0x092e, 0x0926, 0x094d, 0x0020,
0x092d, 0x0917, 0x0935, 0x0926, 0x094d, 0x0917, 0x0940, 0x0924,
0x093e, 0x0020, 0x0905, 0x0927, 0x094d, 0x092f, 0x093e, 0x092f,
0x0020, 0x0905, 0x0930, 0x094d, 0x091c, 0x0941, 0x0928, 0x0020,
0x0935, 0x093f, 0x0937, 0x093e, 0x0926, 0x0020, 0x092f, 0x094b,
0x0917, 0x0020, 0x0927, 0x0943, 0x0924, 0x0930, 0x093e, 0x0937,
0x094d, 0x091f, 0x094d, 0x0930, 0x0020, 0x0909, 0x0935, 0x093E,
0x091A, 0x0943, 0x0020, 0x0927, 0x0930, 0x094d, 0x092e, 0x0915,
0x094d, 0x0937, 0x0947, 0x0924, 0x094d, 0x0930, 0x0947, 0x0020,
0x0915, 0x0941, 0x0930, 0x0941, 0x0915, 0x094d, 0x0937, 0x0947,
0x0924, 0x094d, 0x0930, 0x0947, 0x0020, 0x0938, 0x092e, 0x0935,
0x0947, 0x0924, 0x093e, 0x0020, 0x092f, 0x0941, 0x092f, 0x0941,
0x0924, 0x094d, 0x0938, 0x0935, 0x0903, 0x0020, 0x092e, 0x093e,
0x092e, 0x0915, 0x093e, 0x0903, 0x0020, 0x092a, 0x093e, 0x0923,
0x094d, 0x0921, 0x0935, 0x093e, 0x0936, 0x094d, 0x091a, 0x0948,
0x0935, 0x0020, 0x0915, 0x093f, 0x092e, 0x0915, 0x0941, 0x0930,
0x094d, 0x0935, 0x0924, 0x0020, 0x0938, 0x0902, 0x091c, 0x0935
};
int32_t devaTextLength = ARRAY_LENGTH(devaText);
UChar arabText[] =
{
0x0623, 0x0633, 0x0627, 0x0633, 0x064B, 0x0627, 0x060C, 0x0020,
0x062A, 0x062A, 0x0639, 0x0627, 0x0645, 0x0644, 0x0020,
0x0627, 0x0644, 0x062D, 0x0648, 0x0627, 0x0633, 0x064A, 0x0628,
0x0020, 0x0641, 0x0642, 0x0637, 0x0020, 0x0645, 0x0639, 0x0020,
0x0627, 0x0644, 0x0623, 0x0631, 0x0642, 0x0627, 0x0645, 0x060C,
0x0020, 0x0648, 0x062A, 0x0642, 0x0648, 0x0645, 0x0020, 0x0628,
0x062A, 0x062E, 0x0632, 0x064A, 0x0646, 0x0020, 0x0627, 0x0644,
0x0623, 0x062D, 0x0631, 0x0641, 0x0020, 0x0648, 0x0627, 0x0644,
0x0645, 0x062D, 0x0627, 0x0631, 0x0641, 0x0020, 0x0627, 0x0644,
0x0623, 0x062E, 0x0631, 0x0649, 0x0020, 0x0628, 0x0639, 0x062F,
0x0020, 0x0623, 0x0646, 0x0020, 0x062A, 0x064F, 0x0639, 0x0637,
0x064A, 0x0020, 0x0631, 0x0642, 0x0645, 0x0627, 0x0020, 0x0645,
0x0639, 0x064A, 0x0646, 0x0627, 0x0020, 0x0644, 0x0643, 0x0644,
0x0020, 0x0648, 0x0627, 0x062D, 0x062F, 0x0020, 0x0645, 0x0646,
0x0647, 0x0627, 0x002E, 0x0020, 0x0648, 0x0642, 0x0628, 0x0644,
0x0020, 0x0627, 0x062E, 0x062A, 0x0631, 0x0627, 0x0639, 0x0020,
0x0022, 0x064A, 0x0648, 0x0646, 0x0650, 0x0643, 0x0648, 0x062F,
0x0022, 0x060C, 0x0020, 0x0643, 0x0627, 0x0646, 0x0020, 0x0647,
0x0646, 0x0627, 0x0643, 0x0020, 0x0645, 0x0626, 0x0627, 0x062A,
0x0020, 0x0627, 0x0644, 0x0623, 0x0646, 0x0638, 0x0645, 0x0629,
0x0020, 0x0644, 0x0644, 0x062A, 0x0634, 0x0641, 0x064A, 0x0631,
0x0020, 0x0648, 0x062A, 0x062E, 0x0635, 0x064A, 0x0635, 0x0020,
0x0647, 0x0630, 0x0647, 0x0020, 0x0627, 0x0644, 0x0623, 0x0631,
0x0642, 0x0627, 0x0645, 0x0020, 0x0644, 0x0644, 0x0645, 0x062D,
0x0627, 0x0631, 0x0641, 0x060C, 0x0020, 0x0648, 0x0644, 0x0645,
0x0020, 0x064A, 0x0648, 0x062C, 0x062F, 0x0020, 0x0646, 0x0638,
0x0627, 0x0645, 0x0020, 0x062A, 0x0634, 0x0641, 0x064A, 0x0631,
0x0020, 0x0648, 0x0627, 0x062D, 0x062F, 0x0020, 0x064A, 0x062D,
0x062A, 0x0648, 0x064A, 0x0020, 0x0639, 0x0644, 0x0649, 0x0020,
0x062C, 0x0645, 0x064A, 0x0639, 0x0020, 0x0627, 0x0644, 0x0645,
0x062D, 0x0627, 0x0631, 0x0641, 0x0020, 0x0627, 0x0644, 0x0636,
0x0631, 0x0648, 0x0631, 0x064A, 0x0629
/* The next few sentences...
0x002E, 0x0020, 0x0648,
0x0639, 0x0644, 0x0649, 0x0020, 0x0633, 0x0628, 0x064A, 0x0644,
0x0020, 0x0627, 0x0644, 0x0645, 0x062B, 0x0627, 0x0644, 0x060C,
0x0020, 0x0641, 0x0625, 0x0646, 0x0020, 0x0627, 0x0644, 0x0627,
0x062A, 0x062D, 0x0627, 0x062F, 0x0020, 0x0627, 0x0644, 0x0623,
0x0648, 0x0631, 0x0648, 0x0628, 0x064A, 0x0020, 0x0644, 0x0648,
0x062D, 0x062F, 0x0647, 0x060C, 0x0020, 0x0627, 0x062D, 0x062A,
0x0648, 0x0649, 0x0020, 0x0627, 0x0644, 0x0639, 0x062F, 0x064A,
0x062F, 0x0020, 0x0645, 0x0646, 0x0020, 0x0627, 0x0644, 0x0634,
0x0641, 0x0631, 0x0627, 0x062A, 0x0020, 0x0627, 0x0644, 0x0645,
0x062E, 0x062A, 0x0644, 0x0641, 0x0629, 0x0020, 0x0644, 0x064A,
0x063A, 0x0637, 0x064A, 0x0020, 0x062C, 0x0645, 0x064A, 0x0639,
0x0020, 0x0627, 0x0644, 0x0644, 0x063A, 0x0627, 0x062A, 0x0020,
0x0627, 0x0644, 0x0645, 0x0633, 0x062A, 0x062E, 0x062F, 0x0645,
0x0629, 0x0020, 0x0641, 0x064A, 0x0020, 0x0627, 0x0644, 0x0627,
0x062A, 0x062D, 0x0627, 0x062F, 0x002E, 0x0020, 0x0648, 0x062D,
0x062A, 0x0649, 0x0020, 0x0644, 0x0648, 0x0020, 0x0627, 0x0639,
0x062A, 0x0628, 0x0631, 0x0646, 0x0627, 0x0020, 0x0644, 0x063A,
0x0629, 0x0020, 0x0648, 0x0627, 0x062D, 0x062F, 0x0629, 0x060C,
0x0020, 0x0643, 0x0627, 0x0644, 0x0644, 0x063A, 0x0629, 0x0020,
0x0627, 0x0644, 0x0625, 0x0646, 0x062C, 0x0644, 0x064A, 0x0632,
0x064A, 0x0629, 0x060C, 0x0020, 0x0641, 0x0625, 0x0646, 0x0020,
0x062C, 0x062F, 0x0648, 0x0644, 0x0020, 0x0634, 0x0641, 0x0631,
0x0629, 0x0020, 0x0648, 0x0627, 0x062D, 0x062F, 0x0020, 0x0644,
0x0645, 0x0020, 0x064A, 0x0643, 0x0641, 0x0020, 0x0644, 0x0627,
0x0633, 0x062A, 0x064A, 0x0639, 0x0627, 0x0628, 0x0020, 0x062C,
0x0645, 0x064A, 0x0639, 0x0020, 0x0627, 0x0644, 0x0623, 0x062D,
0x0631, 0x0641, 0x0020, 0x0648, 0x0639, 0x0644, 0x0627, 0x0645,
0x0627, 0x062A, 0x0020, 0x0627, 0x0644, 0x062A, 0x0631, 0x0642,
0x064A, 0x0645, 0x0020, 0x0648, 0x0627, 0x0644, 0x0631, 0x0645,
0x0648, 0x0632, 0x0020, 0x0627, 0x0644, 0x0641, 0x0646, 0x064A,
0x0629, 0x0020, 0x0648, 0x0627, 0x0644, 0x0639, 0x0644, 0x0645,
0x064A, 0x0629, 0x0020, 0x0627, 0x0644, 0x0634, 0x0627, 0x0626,
0x0639, 0x0629, 0x0020, 0x0627, 0x0644, 0x0627, 0x0633, 0x062A,
0x0639, 0x0645, 0x0627, 0x0644, 0x002E */
};
int32_t arabTextLength = ARRAY_LENGTH(arabText);
UChar thaiSample[] =
{
0x0E1A, 0x0E17, 0x0E17, 0x0E35, 0x0E48, 0x0E51, 0x0E1E, 0x0E32,
0x0E22, 0x0E38, 0x0E44, 0x0E0B, 0x0E42, 0x0E04, 0x0E25, 0x0E19,
0x0E42, 0x0E14, 0x0E42, 0x0E23, 0x0E18, 0x0E35, 0x0E2D, 0x0E32,
0x0E28, 0x0E31, 0x0E22, 0x0E2D, 0x0E22, 0x0E39, 0x0E48, 0x0E17,
0x0E48, 0x0E32, 0x0E21, 0x0E01, 0x0E25, 0x0E32, 0x0E07, 0x0E17,
0x0E38, 0x0E48, 0x0E07, 0x0E43, 0x0E2B, 0x0E0D, 0x0E48, 0x0E43,
0x0E19, 0x0E41, 0x0E04, 0x0E19, 0x0E0B, 0x0E31, 0x0E2A, 0x0E01,
0x0E31, 0x0E1A, 0x0E25, 0x0E38, 0x0E07, 0x0E40, 0x0E2E, 0x0E19,
0x0E23, 0x0E35, 0x0E0A, 0x0E32, 0x0E27, 0x0E44, 0x0E23, 0x0E48,
0x0E41, 0x0E25, 0x0E30, 0x0E1B, 0x0E49, 0x0E32, 0x0E40, 0x0E2D,
0x0E47, 0x0E21, 0x0E20, 0x0E23, 0x0E23, 0x0E22, 0x0E32, 0x0E0A,
0x0E32, 0x0E27, 0x0E44, 0x0E23, 0x0E48, 0x0E1A, 0x0E49, 0x0E32,
0x0E19, 0x0E02, 0x0E2D, 0x0E07, 0x0E1E, 0x0E27, 0x0E01, 0x0E40,
0x0E02, 0x0E32, 0x0E2B, 0x0E25, 0x0E31, 0x0E07, 0x0E40, 0x0E25,
0x0E47, 0x0E01, 0x0E40, 0x0E1E, 0x0E23, 0x0E32, 0x0E30, 0x0E44,
0x0E21, 0x0E49, 0x0E2A, 0x0E23, 0x0E49, 0x0E32, 0x0E07, 0x0E1A,
0x0E49, 0x0E32, 0x0E19, 0x0E15, 0x0E49, 0x0E2D, 0x0E07, 0x0E02,
0x0E19, 0x0E21, 0x0E32, 0x0E14, 0x0E49, 0x0E27, 0x0E22, 0x0E40,
0x0E01, 0x0E27, 0x0E35, 0x0E22, 0x0E19, 0x0E40, 0x0E1B, 0x0E47,
0x0E19, 0x0E23, 0x0E30, 0x0E22, 0x0E30, 0x0E17, 0x0E32, 0x0E07,
0x0E2B, 0x0E25, 0x0E32, 0x0E22, 0x0E44, 0x0E21, 0x0E25, 0x0E4C
/* A few more lines...
0x0E1A, 0x0E49, 0x0E32, 0x0E19, 0x0E21, 0x0E35, 0x0E2A, 0x0E35,
0x0E48, 0x0E1D, 0x0E32, 0x0E21, 0x0E35, 0x0E1E, 0x0E37, 0x0E49,
0x0E19, 0x0E01, 0x0E31, 0x0E1A, 0x0E2B, 0x0E25, 0x0E31, 0x0E07,
0x0E04, 0x0E32, 0x0E23, 0x0E27, 0x0E21, 0x0E17, 0x0E33, 0x0E40,
0x0E1B, 0x0E47, 0x0E19, 0x0E2B, 0x0E49, 0x0E2D, 0x0E07, 0x0E40,
0x0E14, 0x0E35, 0x0E22, 0x0E27, 0x0E43, 0x0E19, 0x0E2B, 0x0E49,
0x0E2D, 0x0E07, 0x0E21, 0x0E35, 0x0E17, 0x0E31, 0x0E49, 0x0E07,
0x0E40, 0x0E15, 0x0E32, 0x0E2B, 0x0E38, 0x0E07, 0x0E15, 0x0E49,
0x0E21, 0x0E17, 0x0E35, 0x0E48, 0x0E2A, 0x0E19, 0x0E34, 0x0E21,
0x0E14, 0x0E39, 0x0E02, 0x0E36, 0x0E49, 0x0E19, 0x0E40, 0x0E25,
0x0E2D, 0x0E30, 0x0E21, 0x0E35, 0x0E15, 0x0E39, 0x0E49, 0x0E43,
0x0E2A, 0x0E48, 0x0E16, 0x0E49, 0x0E27, 0x0E22, 0x0E0A, 0x0E32,
0x0E21, 0x0E42, 0x0E15, 0x0E4A, 0x0E30, 0x0E40, 0x0E01, 0x0E49,
0x0E32, 0x0E2D, 0x0E35, 0x0E49, 0x0E2A, 0x0E32, 0x0E21, 0x0E2B,
0x0E23
*/
};
int32_t thaiSampleLength = ARRAY_LENGTH(thaiSample);
TestInput testInputs[] = {
{"Devamt.ttf", devaText, devaTextLength, Unicode::kDevanagari, false},
{"Times.TTF", arabText, arabTextLength, Unicode::kArabic, true},
{"LucidaSansRegular.ttf", arabText, arabTextLength, Unicode::kArabic, true},
{"Thonburi.ttf", thaiSample, thaiSampleLength, Unicode::kThai, false}
};
#define TEST_COUNT ARRAY_LENGTH(testInputs)
int32_t testCount = TEST_COUNT;
void dumpShorts(FILE *file, char *label, int32_t id, uint16_t *shorts, int32_t count) {
char lineBuffer[8 * 8 + 2];
int32_t bufp = 0;
fprintf(file, label, id);
for (int i = 0; i < count; i += 1) {
if (i % 8 == 0 && bufp != 0) {
fprintf(file, " %s\n", lineBuffer);
bufp = 0;
}
bufp += sprintf(&lineBuffer[bufp], "0x%4.4X, ", shorts[i]);
}
if (bufp != 0) {
lineBuffer[bufp - 2] = '\0';
fprintf(file, " %s\n", lineBuffer);
}
fprintf(file, "};\n\n");
}
void dumpLongs(FILE *file, char *label, int32_t id, int32_t *longs, int32_t count) {
char lineBuffer[8 * 12 + 2];
int32_t bufp = 0;
fprintf(file, label, id);
for (int i = 0; i < count; i += 1) {
if (i % 8 == 0 && bufp != 0) {
fprintf(file, " %s\n", lineBuffer);
bufp = 0;
}
bufp += sprintf(&lineBuffer[bufp], "0x%8.8X, ", longs[i]);
}
if (bufp != 0) {
lineBuffer[bufp - 2] = '\0';
fprintf(file, " %s\n", lineBuffer);
}
fprintf(file, "};\n\n");
}
void dumpFloats(FILE *file, char *label, int32_t id, float *floats, int32_t count) {
char lineBuffer[8 * 16 + 2];
int32_t bufp = 0;
fprintf(file, label, id);
for (int i = 0; i < count; i += 1) {
if (i % 8 == 0 && bufp != 0) {
fprintf(file, " %s\n", lineBuffer);
bufp = 0;
}
bufp += sprintf(&lineBuffer[bufp], "%fF, ", floats[i]);
}
if (bufp != 0) {
lineBuffer[bufp - 2] = '\0';
fprintf(file, " %s\n", lineBuffer);
}
fprintf(file, "};\n\n");
}
int main(int argc, char *argv[])
{
Locale dummyLocale;
int32_t test;
FILE *outputFile = fopen(argv[1], "w");
fprintf(outputFile, header);
for (test = 0; test < testCount; test += 1) {
PFIErrorCode fontStatus = PFI_NO_ERROR;
PortableFontInstance fontInstance(testInputs[test].fontName, 12, fontStatus);
if (LE_FAILURE(fontStatus)) {
printf("ERROR: test case %d, could not get a font instance for %s\n", test, testInputs[test].fontName);
continue;
}
UErrorCode success = U_ZERO_ERROR;
ICULayoutEngine *engine = ICULayoutEngine::createInstance(&fontInstance, testInputs[test].scriptCode, dummyLocale, success);
uint32_t glyphCount;
uint16_t *glyphs;
int32_t *indices;
float *positions;
if (LE_FAILURE(success)) {
// would be nice to print the script name here, but
// don't know if it's worth the trouble to maintian
// the table; better to wait for that fuctionality
// to appear in ICU...
printf("ERROR: test case %d, could not create a LayoutEngine.\n", test);
continue;
}
glyphCount = engine->layoutChars(testInputs[test].text, 0, testInputs[test].textLength, testInputs[test].textLength, testInputs[test].rightToLeft, 0, 0, success);
glyphs = new uint16_t[glyphCount];
indices = new int32_t[glyphCount];
positions = new float[glyphCount * 2 + 2];
engine->getGlyphs(glyphs, success);
engine->getCharIndices(indices, success);
engine->getGlyphPositions(positions, success);
//fprintf(outputFile, "font: %s\n", testInputs[test].fontName);
dumpShorts(outputFile, "UChar inputText%d[] =\n{\n", test, testInputs[test].text, testInputs[test].textLength);
dumpShorts(outputFile, "uint16_t resultGlyphs%d[] =\n{\n", test, glyphs, glyphCount);
fprintf(outputFile, "int32_t resultGlyphCount%d = %d;\n\n", test, glyphCount);
dumpLongs(outputFile, "int32_t resultIndices%d[] =\n{\n", test, indices, glyphCount);
dumpFloats(outputFile, "float resultPositions%d[] =\n{\n", test, positions, glyphCount * 2 + 2);
fprintf(outputFile, "\n");
delete[] positions;
delete[] indices;
delete[] glyphs;
delete engine;
}
fprintf(outputFile, "TestInput testInputs[] = \n{\n");
for (test = 0; test < testCount; test += 1) {
fprintf(outputFile, " {\"%s\", inputText%d, %d, Unicode::%s, %s},\n",
testInputs[test].fontName, test, testInputs[test].textLength, scriptNames[testInputs[test].scriptCode],
testInputs[test].rightToLeft? "true" : "false");
}
fprintf(outputFile, "};\n\nint32_t testCount = ARRAY_LENGTH(testInputs);\n\n");
fprintf(outputFile, "TestResult testResults[] = \n{\n");
for (test = 0; test < testCount; test += 1) {
fprintf(outputFile, " {resultGlyphCount%d, resultGlyphs%d, resultIndices%d, resultPositions%d},\n",
test, test, test, test);
}
fprintf(outputFile, "};\n\n");
fclose(outputFile);
return 0;
}

View File

@ -0,0 +1,126 @@
# Microsoft Developer Studio Project File - Name="gendata" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Console Application" 0x0103
CFG=gendata - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "gendata.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "gendata.mak" CFG="gendata - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "gendata - Win32 Release" (based on "Win32 (x86) Console Application")
!MESSAGE "gendata - Win32 Debug" (based on "Win32 (x86) Console Application")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
RSC=rc.exe
!IF "$(CFG)" == "gendata - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /W3 /GX /O2 /I "..\..\..\include\layout" /I "..\..\..\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 ..\..\..\lib\icule.lib ..\..\..\lib\icuuc.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
!ELSEIF "$(CFG)" == "gendata - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\..\..\include\layout" /I "..\..\..\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 ..\..\..\lib\iculed.lib ..\..\..\lib\icuucd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
!ENDIF
# Begin Target
# Name "gendata - Win32 Release"
# Name "gendata - Win32 Debug"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=.\cmaps.cpp
# End Source File
# Begin Source File
SOURCE=.\gendata.cpp
# End Source File
# Begin Source File
SOURCE=.\PortableFontInstance.cpp
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=.\cmaps.h
# End Source File
# Begin Source File
SOURCE=.\letest.h
# End Source File
# Begin Source File
SOURCE=.\PortableFontInstance.h
# End Source File
# Begin Source File
SOURCE=.\sfnt.h
# End Source File
# End Group
# Begin Group "Resource Files"
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
# End Group
# End Target
# End Project

View File

@ -0,0 +1,29 @@
Microsoft Developer Studio Workspace File, Format Version 6.00
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
###############################################################################
Project: "gendata"=.\gendata.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Global:
Package=<5>
{{{
}}}
Package=<3>
{{{
}}}
###############################################################################

View File

@ -0,0 +1,131 @@
/*
*******************************************************************************
*
* Copyright (C) 1999-2000, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
* file name: letest.cpp
*
* created on: 11/06/2000
* created by: Eric R. Mader
*/
#include "math.h"
#include "unicode/utypes.h"
#include "unicode/unicode.h"
#include "unicode/locid.h"
#include "unicode/loengine.h"
#include "PortableFontInstance.h"
#include "letest.h"
UBool compareResults(int32_t testNumber, TestResult *expected, TestResult *actual)
{
/* NOTE: we'll stop on the first failure 'cause once there's one error, it may cascade... */
if (actual->glyphCount != expected->glyphCount) {
printf("incorrect glyph count: exptected %d, got %d\n", expected->glyphCount, actual->glyphCount);
return false;
}
int32_t i;
for (i = 0; i < actual->glyphCount; i += 1) {
if (actual->glyphs[i] != expected->glyphs[i]) {
printf("incorrect id for glyph %d: expected %4X, got %4X\n", i, expected->glyphs[i], actual->glyphs[i]);
return false;
}
}
for (i = 0; i < actual->glyphCount; i += 1) {
if (actual->indices[i] != expected->indices[i]) {
printf("incorrect index for glyph %d: expected %8X, got %8X\n", i, expected->indices[i], actual->indices[i]);
return false;
}
}
for (i = 0; i <= actual->glyphCount; i += 1) {
double xError = fabs(actual->positions[i * 2] - expected->positions[i * 2]);
if (xError > 0.0001) {
printf("incorrect x position for glyph %d: expected %f, got %f\n", i, expected->positions[i * 2], actual->positions[i * 2]);
return false;
}
double yError = fabs(actual->positions[i * 2 + 1] - expected->positions[i * 2 + 1]);
if (yError < 0) {
yError = -yError;
}
if (yError > 0.0001) {
printf("incorrect y position for glyph %d: expected %f, got %f\n", i, expected->positions[i * 2 + 1], actual->positions[i * 2 + 1]);
return false;
}
}
return true;
}
int main(int argc, char *argv[])
{
Locale dummyLocale;
int failures = 0;
for (int test = 0; test < testCount; test += 1) {
PFIErrorCode fontStatus = PFI_NO_ERROR;
printf("Test %d, font = %s... ", test, testInputs[test].fontName);
PortableFontInstance fontInstance(testInputs[test].fontName, 12, fontStatus);
if (LE_FAILURE(fontStatus)) {
printf("could not open font.\n");
continue;
}
UErrorCode success = U_ZERO_ERROR;
ICULayoutEngine *engine = ICULayoutEngine::createInstance(&fontInstance, testInputs[test].scriptCode, dummyLocale, success);
int32_t textLength = testInputs[test].textLength;
UBool result;
TestResult actual;
if (LE_FAILURE(success)) {
// would be nice to print the script name here, but
// don't know if it's worth the trouble to maintian
// the table; better to wait for that fuctionality
// to appear in ICU...
printf("could not create a LayoutEngine.\n");
continue;
}
actual.glyphCount = engine->layoutChars(testInputs[test].text, 0, textLength, textLength, testInputs[test].rightToLeft, 0, 0, success);
actual.glyphs = new uint16_t[actual.glyphCount];
actual.indices = new int32_t[actual.glyphCount];
actual.positions = new float[actual.glyphCount * 2 + 2];
engine->getGlyphs(actual.glyphs, success);
engine->getCharIndices(actual.indices, success);
engine->getGlyphPositions(actual.positions, success);
result = compareResults(test, &testResults[test], &actual);
if (result) {
printf("passed.\n");
} else {
failures += 1;
printf("failed.\n");
}
delete[] actual.positions;
delete[] actual.indices;
delete[] actual.glyphs;
delete engine;
}
return failures;
}

View File

@ -0,0 +1,130 @@
# Microsoft Developer Studio Project File - Name="letest" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Console Application" 0x0103
CFG=letest - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "letest.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "letest.mak" CFG="letest - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "letest - Win32 Release" (based on "Win32 (x86) Console Application")
!MESSAGE "letest - Win32 Debug" (based on "Win32 (x86) Console Application")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
RSC=rc.exe
!IF "$(CFG)" == "letest - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /W3 /GX /O2 /I "..\..\..\include\layout" /I "..\..\..\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 ../../../lib/icule.lib ../../../lib/icuuc.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
!ELSEIF "$(CFG)" == "letest - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "letest___Win32_Debug"
# PROP BASE Intermediate_Dir "letest___Win32_Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\..\..\include\layout" /I "..\..\..\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 ../../../lib/iculed.lib ../../../lib/icuucd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
!ENDIF
# Begin Target
# Name "letest - Win32 Release"
# Name "letest - Win32 Debug"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=.\cmaps.cpp
# End Source File
# Begin Source File
SOURCE=.\letest.cpp
# End Source File
# Begin Source File
SOURCE=.\PortableFontInstance.cpp
# End Source File
# Begin Source File
SOURCE=.\testdata.cpp
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=.\cmaps.h
# End Source File
# Begin Source File
SOURCE=.\letest.h
# End Source File
# Begin Source File
SOURCE=.\PortableFontInstance.h
# End Source File
# Begin Source File
SOURCE=.\sfnt.h
# End Source File
# End Group
# Begin Group "Resource Files"
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
# End Group
# End Target
# End Project

View File

@ -0,0 +1,29 @@
Microsoft Developer Studio Workspace File, Format Version 6.00
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
###############################################################################
Project: "letest"=.\letest.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Global:
Package=<5>
{{{
}}}
Package=<3>
{{{
}}}
###############################################################################

View File

@ -0,0 +1,42 @@
/*
*******************************************************************************
*
* Copyright (C) 1999-2000, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
* file name: letest.h
*
* created on: 11/06/2000
* created by: Eric R. Mader
*/
#include "unicode/utypes.h"
#include "unicode/unicode.h"
#define ARRAY_LENGTH(array) (sizeof array / sizeof array[0])
struct TestInput
{
char *fontName;
UChar *text;
int32_t textLength;
Unicode::EUnicodeScript scriptCode;
UBool rightToLeft;
};
extern int32_t testCount;
extern TestInput testInputs[];
struct TestResult
{
int32_t glyphCount;
uint16_t *glyphs;
int32_t *indices;
float *positions;
};
extern TestResult testResults[];

View File

@ -0,0 +1,74 @@
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Author" content="Eric Mader">
<meta name="GENERATOR" content="Mozilla/4.72 [en] (Windows NT 5.0; U) [Netscape]">
<title>Readme file for letest and gendata</title>
</head>
<body>
<h2>
What are letest and gendata?</h2>
letest is a program you can use to verify that you have built and installed
the ICU LayoutEngine correctly. The test is not comprehensive, it just
verifies that the results of laying out some Devanagari, Arabic and Thai
text are as expected. Once this test has passed, you can use the ICU LayoutEngine
in your application knowing that it has been correctly installed and that
the basic functionality is in place.
<p>gendata is a program that is used by the ICU team to build the source
file testdata.cpp, which contains the expected results of running letest.
Unless you have changed your copy of the LayoutEngine and want to validate
the changes on other platforms, there's no reason for you to run this program.
<p>(The ICU team first runs a Windows application which uses the ICU LayoutEngine
to display the text that letest uses. Once it has been verified that the
text is displayed correctly, gendata is run to produce testdata.cpp, and
then letest is run on Windows to verify that letest still works with the
new data.)
<br>&nbsp;
<h2>
How do I build letest?</h2>
First, you need to build ICU, including the LayoutEngine.
<p>On Windows, the layout project should be listed as a dependency of all,
so layout will build when you build all. If it doesn't for some reason,
just select the layout project in the project toolbar and build it.
<p>On UNIX systems, you need to add the "--enable-layout=yes" option when
you invoke the runConfigureICU script. When you've do that, layout should
build when you do "make all install"
<p>To build letest on Windows, just open the letest project in &lt;icu>\source\test\letest
and build it. On UNIX systems, connect to &lt;top-build-dir>/test/letest
and do "make all"
<br>&nbsp;
<h2>
How do I run letest?</h2>
Before you can run letest, you'll need to get the fonts it uses. For legal
reasons, we can't include them with ICU, but you can get them for free
from the web. Do do this, you'll need access to a computer running Windows.
Here's how to get the fonts:
<p>Download the 1.3 version of the JDK from the <a href="http://www7b.boulder.ibm.com/wsdd/wspvtindex.html">IBM
WebSphere preview technologies</a> page. From this page, follow the "Download"
link on the right had side. You'll need to register with them if you haven't
downloaded before. Download and install the "Runtime Environment Package."
You'll need three fonts from this package. If you've let the installer
use it's defaults, the fonts will be in C:\Program Files\IBM\Java13\jre\lib\fonts.
The files you want are "Devamt.ttf" "LucidaSansRegular.ttf" and "Thornburi.ttf"
Copy these to the directory from which you'll run letest.
<p>There's still one more font to get. Go to the Microsoft <a href="http://www.microsoft.com/typography/fontpack/default.htm">TrueType
core fonts for the Web</a> page and download the "Times New Roman" font.
This will download an installer program, called "Times32.exe" which will
install the Times New Roman fonts in your fonts folder. (If you've already
got these fonts in you fonts folder, you may want to move them to another
folder before you install these fonts.) After you run the installer program,
it will add the Times Roman fonts to your fonts folder. Open the fonts
folder and copy the "Times New Roman" font (the file name will be "Times.TTF")
to the directory from which you'll run letest.
<p>That's it! Now all you have to do is run letest (CTRL+F5 in Visual C++,
or "./letest" in UNIX) If&nbsp; everything's OK you should see something
like this:
<blockquote><tt>Test 0, font = Devamt.ttf... passed.</tt>
<br><tt>Test 1, font = Times.TTF... passed.</tt>
<br><tt>Test 2, font = LucidaSansRegular.ttf... passed.</tt>
<br><tt>Test 3, font = Thonburi.ttf... passed.</tt></blockquote>
</body>
</html>

View File

@ -0,0 +1,228 @@
/*
* %W% %E%
*
* (C) Copyright IBM Corp. 1998 - All Rights Reserved
*
* Portions Copyright 1998 by Sun Microsystems, Inc.,
* 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
* All rights reserved.
*
* This software is the confidential and proprietary information
* of Sun Microsystems, Inc. ("Confidential Information"). You
* shall not disclose such Confidential Information and shall use
* it only in accordance with the terms of the license agreement
* you entered into with Sun.
*
* The original version of this source code and documentation is
* copyrighted and owned by IBM. These materials are provided
* under terms of a License Agreement between IBM and Sun.
* This technology is protected by multiple US and International
* patents. This notice and attribution to IBM may not be removed.
*/
#ifndef __SFNT_H
#define __SFNT_H
#include "LETypes.h"
#ifndef ANY_NUMBER
#define ANY_NUMBER 1
#endif
struct DirectoryEntry
{
le_uint32 tag;
le_uint32 checksum;
le_uint32 offset;
le_uint32 length;
};
struct SFNTDirectory
{
le_uint32 scalerType;
le_uint16 numTables;
le_uint16 searchRange;
le_uint16 entrySelector;
le_uint16 rangeShift;
DirectoryEntry tableDirectory[ANY_NUMBER];
};
struct CMAPEncodingSubtableHeader
{
le_uint16 platformID;
le_uint16 platformSpecificID;
le_uint32 encodingOffset;
};
struct CMAPTable
{
le_uint16 version;
le_uint16 numberSubtables;
CMAPEncodingSubtableHeader encodingSubtableHeaders[ANY_NUMBER];
};
struct CMAPEncodingSubtable
{
le_uint16 format;
le_uint16 length;
le_uint16 language;
};
struct CMAPFormat0Encoding : CMAPEncodingSubtable
{
le_uint8 glyphIndexArray[256];
};
struct CMAPFormat2Subheader
{
le_uint16 firstCode;
le_uint16 entryCount;
le_int16 idDelta;
le_uint16 idRangeOffset;
};
struct CMAPFormat2Encoding : CMAPEncodingSubtable
{
le_uint16 subHeadKeys[256];
CMAPFormat2Subheader subheaders[ANY_NUMBER];
};
struct CMAPFormat4Encoding : CMAPEncodingSubtable
{
le_uint16 segCountX2;
le_uint16 searchRange;
le_uint16 entrySelector;
le_uint16 rangeShift;
le_uint16 endCodes[ANY_NUMBER];
// le_uint16 reservedPad;
// le_uint16 startCodes[ANY_NUMBER];
// le_uint16 idDelta[ANY_NUMBER];
// le_uint16 idRangeOffset[ANY_NUMBER];
// le_uint16 glyphIndexArray[ANY_NUMBER];
};
struct CMAPFormat6Encoding : CMAPEncodingSubtable
{
le_uint16 firstCode;
le_uint16 entryCount;
le_uint16 glyphIndexArray[ANY_NUMBER];
};
struct CMAPEncodingSubtable32
{
le_uint32 format;
le_uint32 length;
le_uint32 language;
};
struct CMAPGroup
{
le_uint32 startCharCode;
le_uint32 endCharCode;
le_uint32 startGlyphCode;
};
struct CMAPFormat8Encoding : CMAPEncodingSubtable32
{
le_uint32 is32[65536/32];
le_uint32 nGroups;
CMAPGroup groups[ANY_NUMBER];
};
struct CMAPFormat10Encoding : CMAPEncodingSubtable32
{
le_uint32 startCharCode;
le_uint32 numCharCodes;
le_uint16 glyphs[ANY_NUMBER];
};
struct CMAPFormat12Encoding : CMAPEncodingSubtable32
{
le_uint32 nGroups;
CMAPGroup groups[ANY_NUMBER];
};
typedef le_int32 fixed;
struct BigDate
{
le_uint32 bc;
le_uint32 ad;
};
struct HEADTable
{
fixed version;
fixed fontRevision;
le_uint32 checksumAdjustment;
le_uint32 magicNumber;
le_uint16 flags;
le_uint16 unitsPerEm;
BigDate created;
BigDate modified;
le_int16 xMin;
le_int16 yMin;
le_int16 xMax;
le_int16 yMax;
le_int16 lowestRecPPEM;
le_int16 fontDirectionHint;
le_int16 indexToLocFormat;
le_int16 glyphDataFormat;
};
struct MAXPTable
{
fixed version;
le_uint16 numGlyphs;
le_uint16 maxPoints;
le_uint16 maxContours;
le_uint16 maxComponentPoints;
le_uint16 maxComponentContours;
le_uint16 maxZones;
le_uint16 maxTwilightPoints;
le_uint16 maxStorage;
le_uint16 maxFunctionDefs;
le_uint16 maxInstructionDefs;
le_uint16 maxStackElements;
le_uint16 maxSizeOfInstructions;
le_uint16 maxComponentElements;
le_uint16 maxComponentDepth;
};
struct HHEATable
{
fixed version;
le_int16 ascent;
le_int16 descent;
le_int16 lineGap;
le_uint16 advanceWidthMax;
le_int16 minLeftSideBearing;
le_int16 minRightSideBearing;
le_int16 xMaxExtent;
le_int16 caretSlopeRise;
le_int16 caretSlopeRun;
le_int16 caretOffset;
le_int16 reserved1;
le_int16 reserved2;
le_int16 reserved3;
le_int16 reserved4;
le_int16 metricDataFormat;
le_uint16 numOfLongHorMetrics;
};
struct LongHorMetric
{
le_uint16 advanceWidth;
le_int16 leftSideBearing;
};
struct HMTXTable
{
LongHorMetric hMetrics[ANY_NUMBER]; // ANY_NUMBER = numOfLongHorMetrics from hhea table
// le_int16 leftSideBearing[ANY_NUMBER]; // ANY_NUMBER = numGlyphs - numOfLongHorMetrics
};
#endif

View File

@ -0,0 +1,626 @@
/*
*******************************************************************************
*
* Copyright (C) 1999-2000, International Business Machines
* Corporation and others. All Rights Reserved.
*
* WARNING: THIS FILE IS MACHINE GENERATED. DO NOT HAND EDIT IT
* UNLESS YOU REALLY KNOW WHAT YOU'RE DOING.
*
*******************************************************************************
*
* file name: testdata.cpp
* created on: 12/14/2000
* created by: gendata.cpp
*/
#include "unicode/utypes.h"
#include "unicode/unicode.h"
#include "letest.h"
UChar inputText0[] =
{
0x0936, 0x094D, 0x0930, 0x0940, 0x092E, 0x0926, 0x094D, 0x0020,
0x092D, 0x0917, 0x0935, 0x0926, 0x094D, 0x0917, 0x0940, 0x0924,
0x093E, 0x0020, 0x0905, 0x0927, 0x094D, 0x092F, 0x093E, 0x092F,
0x0020, 0x0905, 0x0930, 0x094D, 0x091C, 0x0941, 0x0928, 0x0020,
0x0935, 0x093F, 0x0937, 0x093E, 0x0926, 0x0020, 0x092F, 0x094B,
0x0917, 0x0020, 0x0927, 0x0943, 0x0924, 0x0930, 0x093E, 0x0937,
0x094D, 0x091F, 0x094D, 0x0930, 0x0020, 0x0909, 0x0935, 0x093E,
0x091A, 0x0943, 0x0020, 0x0927, 0x0930, 0x094D, 0x092E, 0x0915,
0x094D, 0x0937, 0x0947, 0x0924, 0x094D, 0x0930, 0x0947, 0x0020,
0x0915, 0x0941, 0x0930, 0x0941, 0x0915, 0x094D, 0x0937, 0x0947,
0x0924, 0x094D, 0x0930, 0x0947, 0x0020, 0x0938, 0x092E, 0x0935,
0x0947, 0x0924, 0x093E, 0x0020, 0x092F, 0x0941, 0x092F, 0x0941,
0x0924, 0x094D, 0x0938, 0x0935, 0x0903, 0x0020, 0x092E, 0x093E,
0x092E, 0x0915, 0x093E, 0x0903, 0x0020, 0x092A, 0x093E, 0x0923,
0x094D, 0x0921, 0x0935, 0x093E, 0x0936, 0x094D, 0x091A, 0x0948,
0x0935, 0x0020, 0x0915, 0x093F, 0x092E, 0x0915, 0x0941, 0x0930,
0x094D, 0x0935, 0x0924, 0x0020, 0x0938, 0x0902, 0x091C, 0x0935
};
uint16_t resultGlyphs0[] =
{
0x01C1, 0xFFFF, 0xFFFF, 0x0104, 0x00F4, 0x00EC, 0x0111, 0x0003,
0x00F3, 0x00DD, 0x00FB, 0x0299, 0xFFFF, 0xFFFF, 0x031A, 0x00EA,
0x0102, 0x0003, 0x00CB, 0x016F, 0xFFFF, 0x00F5, 0x0102, 0x00F5,
0x0003, 0x00CB, 0x00E2, 0x0105, 0x0158, 0xFFFF, 0x00EE, 0x0003,
0x02D1, 0x00FB, 0x00FD, 0x0102, 0x00EC, 0x0003, 0x00F5, 0x010F,
0x00DD, 0x0003, 0x00ED, 0x0107, 0x00EA, 0x00F6, 0x0102, 0x02BD,
0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x0003, 0x00CF, 0x00FB, 0x0102,
0x00E0, 0x0107, 0x0003, 0x00ED, 0x00F4, 0x0158, 0xFFFF, 0x0156,
0xFFFF, 0xFFFF, 0x010B, 0x01B2, 0xFFFF, 0xFFFF, 0x010B, 0x0003,
0x00DB, 0x0105, 0x0237, 0xFFFF, 0x0156, 0xFFFF, 0xFFFF, 0x010B,
0x01B2, 0xFFFF, 0xFFFF, 0x010B, 0x0003, 0x00FE, 0x00F4, 0x00FB,
0x010B, 0x00EA, 0x0102, 0x0003, 0x00F5, 0x0105, 0x00F5, 0x0105,
0x016C, 0xFFFF, 0x00FE, 0x00FB, 0x00CA, 0x0003, 0x00F4, 0x0102,
0x00F4, 0x00DB, 0x0102, 0x00CA, 0x0003, 0x00F0, 0x0102, 0x016B,
0xFFFF, 0x00E7, 0x00FB, 0x0102, 0x02B6, 0xFFFF, 0xFFFF, 0x010C,
0x00FB, 0x0003, 0x02CF, 0x00DB, 0x00F4, 0x00DB, 0x0105, 0x00FB,
0x0158, 0xFFFF, 0x00EA, 0x0003, 0x00FE, 0x00C9, 0x00E2, 0x00FB
};
int32_t resultGlyphCount0 = 136;
int32_t resultIndices0[] =
{
0x00000000, 0x00000002, 0x00000001, 0x00000003, 0x00000004, 0x00000005, 0x00000006, 0x00000007,
0x00000008, 0x00000009, 0x0000000A, 0x0000000B, 0x0000000C, 0x0000000D, 0x0000000E, 0x0000000F,
0x00000010, 0x00000011, 0x00000012, 0x00000013, 0x00000014, 0x00000015, 0x00000016, 0x00000017,
0x00000018, 0x00000019, 0x0000001C, 0x0000001D, 0x0000001A, 0x0000001B, 0x0000001E, 0x0000001F,
0x00000021, 0x00000020, 0x00000022, 0x00000023, 0x00000024, 0x00000025, 0x00000026, 0x00000027,
0x00000028, 0x00000029, 0x0000002A, 0x0000002B, 0x0000002C, 0x0000002D, 0x0000002E, 0x0000002F,
0x00000030, 0x00000031, 0x00000033, 0x00000032, 0x00000034, 0x00000035, 0x00000036, 0x00000037,
0x00000038, 0x00000039, 0x0000003A, 0x0000003B, 0x0000003E, 0x0000003C, 0x0000003D, 0x0000003F,
0x00000040, 0x00000041, 0x00000042, 0x00000043, 0x00000045, 0x00000044, 0x00000046, 0x00000047,
0x00000048, 0x00000049, 0x0000004A, 0x0000004B, 0x0000004C, 0x0000004D, 0x0000004E, 0x0000004F,
0x00000050, 0x00000052, 0x00000051, 0x00000053, 0x00000054, 0x00000055, 0x00000056, 0x00000057,
0x00000058, 0x00000059, 0x0000005A, 0x0000005B, 0x0000005C, 0x0000005D, 0x0000005E, 0x0000005F,
0x00000060, 0x00000061, 0x00000062, 0x00000063, 0x00000064, 0x00000065, 0x00000066, 0x00000067,
0x00000068, 0x00000069, 0x0000006A, 0x0000006B, 0x0000006C, 0x0000006D, 0x0000006E, 0x0000006F,
0x00000070, 0x00000071, 0x00000072, 0x00000073, 0x00000074, 0x00000075, 0x00000076, 0x00000077,
0x00000078, 0x00000079, 0x0000007B, 0x0000007A, 0x0000007C, 0x0000007D, 0x0000007E, 0x00000081,
0x0000007F, 0x00000080, 0x00000082, 0x00000083, 0x00000084, 0x00000085, 0x00000086, 0x00000087
};
float resultPositions0[] =
{
0.000000F, 0.000000F, 7.968750F, 0.000000F, 7.968750F, 0.000000F, 7.968750F, 0.000000F,
11.332031F, 0.000000F, 18.691406F, 0.000000F, 24.960938F, 0.000000F, 25.083984F, 0.000000F,
28.083984F, 0.000000F, 36.117188F, 0.000000F, 42.996094F, 0.000000F, 49.863281F, 0.000000F,
58.160156F, 0.000000F, 58.160156F, 0.000000F, 58.160156F, 0.000000F, 61.523438F, 0.000000F,
68.314453F, 0.000000F, 71.677734F, 0.000000F, 74.677734F, 0.000000F, 82.757813F, 0.000000F,
87.544922F, 0.000000F, 87.544922F, 0.000000F, 94.511719F, 0.000000F, 97.875000F, 0.000000F,
104.841797F, 0.000000F, 107.841797F, 0.000000F, 115.921875F, 0.000000F, 123.937500F, 0.000000F,
123.937500F, 0.000000F, 123.937500F, 0.000000F, 123.937500F, 0.000000F, 130.728516F, 0.000000F,
133.728516F, 0.000000F, 137.091797F, 0.000000F, 143.958984F, 0.000000F, 151.025391F, 0.000000F,
154.388672F, 0.000000F, 160.781250F, 0.000000F, 163.781250F, 0.000000F, 170.748047F, 0.000000F,
174.111328F, 0.000000F, 180.990234F, 0.000000F, 183.990234F, 0.000000F, 191.437500F, 0.000000F,
191.437500F, 0.000000F, 198.228516F, 0.000000F, 204.058594F, 0.000000F, 207.421875F, 0.000000F,
214.417969F, 0.000000F, 214.417969F, 0.000000F, 214.417969F, 0.000000F, 214.417969F, 0.000000F,
214.417969F, 0.000000F, 217.417969F, 0.000000F, 224.501953F, 0.000000F, 231.369141F, 0.000000F,
234.732422F, 0.000000F, 242.748047F, 0.000000F, 242.748047F, 0.000000F, 245.748047F, 0.000000F,
253.195313F, 0.000000F, 260.554688F, 0.000000F, 260.554688F, 0.000000F, 260.554688F, 0.000000F,
268.798828F, 0.000000F, 268.798828F, 0.000000F, 268.798828F, 0.000000F, 268.798828F, 0.000000F,
275.923828F, 0.000000F, 275.923828F, 0.000000F, 275.923828F, 0.000000F, 275.923828F, 0.000000F,
278.923828F, 0.000000F, 284.976563F, 0.000000F, 286.927734F, 0.000000F, 293.542969F, 0.000000F,
293.542969F, 0.000000F, 301.787109F, 0.000000F, 301.787109F, 0.000000F, 301.787109F, 0.000000F,
301.787109F, 0.000000F, 308.912109F, 0.000000F, 308.912109F, 0.000000F, 308.912109F, 0.000000F,
308.912109F, 0.000000F, 311.912109F, 0.000000F, 319.435547F, 0.000000F, 326.794922F, 0.000000F,
333.662109F, 0.000000F, 333.662109F, 0.000000F, 340.453125F, 0.000000F, 343.816406F, 0.000000F,
346.816406F, 0.000000F, 353.783203F, 0.000000F, 353.783203F, 0.000000F, 360.750000F, 0.000000F,
360.750000F, 0.000000F, 364.582031F, 0.000000F, 364.582031F, 0.000000F, 372.105469F, 0.000000F,
378.972656F, 0.000000F, 382.500000F, 0.000000F, 385.500000F, 0.000000F, 392.859375F, 0.000000F,
396.222656F, 0.000000F, 403.582031F, 0.000000F, 411.585938F, 0.000000F, 414.949219F, 0.000000F,
418.476563F, 0.000000F, 421.476563F, 0.000000F, 428.021484F, 0.000000F, 431.384766F, 0.000000F,
436.541016F, 0.000000F, 436.541016F, 0.000000F, 443.537109F, 0.000000F, 450.404297F, 0.000000F,
453.767578F, 0.000000F, 463.300781F, 0.000000F, 463.300781F, 0.000000F, 463.300781F, 0.000000F,
463.300781F, 0.000000F, 470.167969F, 0.000000F, 473.167969F, 0.000000F, 476.531250F, 0.000000F,
484.535156F, 0.000000F, 491.894531F, 0.000000F, 497.947266F, 0.000000F, 499.898438F, 0.000000F,
506.765625F, 0.000000F, 506.765625F, 0.000000F, 506.765625F, 0.000000F, 513.556641F, 0.000000F,
516.556641F, 0.000000F, 524.080078F, 0.000000F, 524.080078F, 0.000000F, 532.095703F, 0.000000F,
538.962891F, 0.000000F
};
UChar inputText1[] =
{
0x0623, 0x0633, 0x0627, 0x0633, 0x064B, 0x0627, 0x060C, 0x0020,
0x062A, 0x062A, 0x0639, 0x0627, 0x0645, 0x0644, 0x0020, 0x0627,
0x0644, 0x062D, 0x0648, 0x0627, 0x0633, 0x064A, 0x0628, 0x0020,
0x0641, 0x0642, 0x0637, 0x0020, 0x0645, 0x0639, 0x0020, 0x0627,
0x0644, 0x0623, 0x0631, 0x0642, 0x0627, 0x0645, 0x060C, 0x0020,
0x0648, 0x062A, 0x0642, 0x0648, 0x0645, 0x0020, 0x0628, 0x062A,
0x062E, 0x0632, 0x064A, 0x0646, 0x0020, 0x0627, 0x0644, 0x0623,
0x062D, 0x0631, 0x0641, 0x0020, 0x0648, 0x0627, 0x0644, 0x0645,
0x062D, 0x0627, 0x0631, 0x0641, 0x0020, 0x0627, 0x0644, 0x0623,
0x062E, 0x0631, 0x0649, 0x0020, 0x0628, 0x0639, 0x062F, 0x0020,
0x0623, 0x0646, 0x0020, 0x062A, 0x064F, 0x0639, 0x0637, 0x064A,
0x0020, 0x0631, 0x0642, 0x0645, 0x0627, 0x0020, 0x0645, 0x0639,
0x064A, 0x0646, 0x0627, 0x0020, 0x0644, 0x0643, 0x0644, 0x0020,
0x0648, 0x0627, 0x062D, 0x062F, 0x0020, 0x0645, 0x0646, 0x0647,
0x0627, 0x002E, 0x0020, 0x0648, 0x0642, 0x0628, 0x0644, 0x0020,
0x0627, 0x062E, 0x062A, 0x0631, 0x0627, 0x0639, 0x0020, 0x0022,
0x064A, 0x0648, 0x0646, 0x0650, 0x0643, 0x0648, 0x062F, 0x0022,
0x060C, 0x0020, 0x0643, 0x0627, 0x0646, 0x0020, 0x0647, 0x0646,
0x0627, 0x0643, 0x0020, 0x0645, 0x0626, 0x0627, 0x062A, 0x0020,
0x0627, 0x0644, 0x0623, 0x0646, 0x0638, 0x0645, 0x0629, 0x0020,
0x0644, 0x0644, 0x062A, 0x0634, 0x0641, 0x064A, 0x0631, 0x0020,
0x0648, 0x062A, 0x062E, 0x0635, 0x064A, 0x0635, 0x0020, 0x0647,
0x0630, 0x0647, 0x0020, 0x0627, 0x0644, 0x0623, 0x0631, 0x0642,
0x0627, 0x0645, 0x0020, 0x0644, 0x0644, 0x0645, 0x062D, 0x0627,
0x0631, 0x0641, 0x060C, 0x0020, 0x0648, 0x0644, 0x0645, 0x0020,
0x064A, 0x0648, 0x062C, 0x062F, 0x0020, 0x0646, 0x0638, 0x0627,
0x0645, 0x0020, 0x062A, 0x0634, 0x0641, 0x064A, 0x0631, 0x0020,
0x0648, 0x0627, 0x062D, 0x062F, 0x0020, 0x064A, 0x062D, 0x062A,
0x0648, 0x064A, 0x0020, 0x0639, 0x0644, 0x0649, 0x0020, 0x062C,
0x0645, 0x064A, 0x0639, 0x0020, 0x0627, 0x0644, 0x0645, 0x062D,
0x0627, 0x0631, 0x0641, 0x0020, 0x0627, 0x0644, 0x0636, 0x0631,
0x0648, 0x0631, 0x064A, 0x0629
};
uint16_t resultGlyphs1[] =
{
0x0394, 0x03F3, 0x03AD, 0x03ED, 0x03AE, 0x03C0, 0x03DF, 0x038D,
0x0003, 0x03D1, 0x03AD, 0x038E, 0x03A4, 0x03E4, 0x03DF, 0x038D,
0x0003, 0x03CA, 0x03F4, 0x03E4, 0x039F, 0x0003, 0x03F0, 0x03E0,
0x03CB, 0x0003, 0x03F1, 0x03EE, 0x0398, 0x03A4, 0x03F3, 0x0003,
0x03AA, 0x03A3, 0x038D, 0x03ED, 0x0003, 0x03AE, 0x03F4, 0x03D4,
0x03B8, 0x0397, 0x0003, 0x03E1, 0x038E, 0x03C8, 0x03E7, 0x0003,
0x03AA, 0x039F, 0x03EE, 0x03F3, 0x0003, 0x03E2, 0x03DF, 0x03ED,
0x0003, 0x02EC, 0x03D1, 0x03AD, 0x038E, 0x03A4, 0x03E4, 0x03E0,
0x03DF, 0x0003, 0x03E1, 0x038E, 0x03D7, 0x03AD, 0xFFFE, 0x03F7,
0x038D, 0x0003, 0x03E9, 0x03AC, 0x03EB, 0x0003, 0x03BA, 0x03F4,
0x03BC, 0x03A8, 0x0397, 0x03ED, 0x0003, 0x03AE, 0x03F4, 0x03D4,
0x03B8, 0x0398, 0x03E0, 0x03DF, 0x0003, 0x0394, 0x03E4, 0x03C8,
0x03E7, 0xFFFE, 0x03F7, 0x038D, 0x0003, 0x0395, 0x038E, 0x038C,
0x03E3, 0x0003, 0x03D9, 0x038E, 0x03E8, 0x03EB, 0x0003, 0x03E5,
0x038E, 0x03DB, 0x0003, 0x02EC, 0x0005, 0x03A9, 0x03EE, 0x03DC,
0x02F6, 0x03E7, 0x03EE, 0x03F3, 0x0005, 0x0003, 0x03C9, 0x038D,
0x03AE, 0x0398, 0x03A7, 0x038D, 0x0003, 0x03DE, 0x0392, 0x03D7,
0x03ED, 0x0003, 0x0011, 0x038E, 0x03EC, 0x03E8, 0x03E3, 0x0003,
0x03AA, 0x03A3, 0x038D, 0x03ED, 0x0003, 0x03DE, 0x03DC, 0x03DF,
0x0003, 0x038E, 0x03E8, 0x03F4, 0x03CC, 0x03E3, 0x0003, 0x038E,
0x03E4, 0x03D7, 0x03AD, 0x0003, 0x03F2, 0x03C4, 0x03CC, 0x02F5,
0x0397, 0x0003, 0x03E5, 0x0383, 0x0003, 0x03AA, 0x03CC, 0x0391,
0x0003, 0x03EF, 0x03AE, 0x03A7, 0xFFFE, 0x03F7, 0x038D, 0x0003,
0x03D1, 0x03AD, 0x038E, 0x03A4, 0x03E4, 0x03DF, 0x038D, 0x03ED,
0x0003, 0x03D1, 0x03AE, 0x03A3, 0xFFFE, 0x03F7, 0x038D, 0x0003,
0x03E6, 0x03F3, 0x03B0, 0x03A8, 0x0398, 0x0391, 0x0003, 0x03E1,
0x03EE, 0x03D8, 0x0397, 0x03ED, 0x0003, 0x02EC, 0x03E1, 0x038E,
0x03D7, 0x03AD, 0xFFFE, 0x03F7, 0x038D, 0x0003, 0x03CA, 0x03E3,
0x0003, 0x03C2, 0x03D8, 0x03D3, 0x0003, 0x0390, 0x03F4, 0x03B3,
0x038D, 0x03EE, 0x03A4, 0x03DF, 0x038D, 0x0003, 0x03DE, 0x03E3,
0x038E, 0x03CC, 0x0398, 0x0397, 0x0003, 0x02EC, 0x038E, 0x02F1,
0x03B3, 0x038E, 0x03B3, 0x0383
};
int32_t resultGlyphCount1 = 252;
int32_t resultIndices1[] =
{
0x000000FB, 0x000000FA, 0x000000F9, 0x000000F8, 0x000000F7, 0x000000F6, 0x000000F5, 0x000000F4,
0x000000F3, 0x000000F2, 0x000000F1, 0x000000F0, 0x000000EF, 0x000000EE, 0x000000ED, 0x000000EC,
0x000000EB, 0x000000EA, 0x000000E9, 0x000000E8, 0x000000E7, 0x000000E6, 0x000000E5, 0x000000E4,
0x000000E3, 0x000000E2, 0x000000E1, 0x000000E0, 0x000000DF, 0x000000DE, 0x000000DD, 0x000000DC,
0x000000DB, 0x000000DA, 0x000000D9, 0x000000D8, 0x000000D7, 0x000000D6, 0x000000D5, 0x000000D4,
0x000000D3, 0x000000D2, 0x000000D1, 0x000000D0, 0x000000CF, 0x000000CE, 0x000000CD, 0x000000CC,
0x000000CB, 0x000000CA, 0x000000C9, 0x000000C8, 0x000000C7, 0x000000C6, 0x000000C5, 0x000000C4,
0x000000C3, 0x000000C2, 0x000000C1, 0x000000C0, 0x000000BF, 0x000000BE, 0x000000BD, 0x000000BC,
0x000000BB, 0x000000BA, 0x000000B9, 0x000000B8, 0x000000B7, 0x000000B6, 0x000000B5, 0x000000B4,
0x000000B3, 0x000000B2, 0x000000B1, 0x000000B0, 0x000000AF, 0x000000AE, 0x000000AD, 0x000000AC,
0x000000AB, 0x000000AA, 0x000000A9, 0x000000A8, 0x000000A7, 0x000000A6, 0x000000A5, 0x000000A4,
0x000000A3, 0x000000A2, 0x000000A1, 0x000000A0, 0x0000009F, 0x0000009E, 0x0000009D, 0x0000009C,
0x0000009B, 0x0000009A, 0x00000099, 0x00000098, 0x00000097, 0x00000096, 0x00000095, 0x00000094,
0x00000093, 0x00000092, 0x00000091, 0x00000090, 0x0000008F, 0x0000008E, 0x0000008D, 0x0000008C,
0x0000008B, 0x0000008A, 0x00000089, 0x00000088, 0x00000087, 0x00000086, 0x00000085, 0x00000084,
0x00000083, 0x00000082, 0x00000081, 0x00000080, 0x0000007F, 0x0000007E, 0x0000007D, 0x0000007C,
0x0000007B, 0x0000007A, 0x00000079, 0x00000078, 0x00000077, 0x00000076, 0x00000075, 0x00000074,
0x00000073, 0x00000072, 0x00000071, 0x00000070, 0x0000006F, 0x0000006E, 0x0000006D, 0x0000006C,
0x0000006B, 0x0000006A, 0x00000069, 0x00000068, 0x00000067, 0x00000066, 0x00000065, 0x00000064,
0x00000063, 0x00000062, 0x00000061, 0x00000060, 0x0000005F, 0x0000005E, 0x0000005D, 0x0000005C,
0x0000005B, 0x0000005A, 0x00000059, 0x00000058, 0x00000057, 0x00000056, 0x00000055, 0x00000054,
0x00000053, 0x00000052, 0x00000051, 0x00000050, 0x0000004F, 0x0000004E, 0x0000004D, 0x0000004C,
0x0000004B, 0x0000004A, 0x00000049, 0x00000048, 0x00000047, 0x00000046, 0x00000045, 0x00000044,
0x00000043, 0x00000042, 0x00000041, 0x00000040, 0x0000003F, 0x0000003E, 0x0000003D, 0x0000003C,
0x0000003B, 0x0000003A, 0x00000039, 0x00000038, 0x00000037, 0x00000036, 0x00000035, 0x00000034,
0x00000033, 0x00000032, 0x00000031, 0x00000030, 0x0000002F, 0x0000002E, 0x0000002D, 0x0000002C,
0x0000002B, 0x0000002A, 0x00000029, 0x00000028, 0x00000027, 0x00000026, 0x00000025, 0x00000024,
0x00000023, 0x00000022, 0x00000021, 0x00000020, 0x0000001F, 0x0000001E, 0x0000001D, 0x0000001C,
0x0000001B, 0x0000001A, 0x00000019, 0x00000018, 0x00000017, 0x00000016, 0x00000015, 0x00000014,
0x00000013, 0x00000012, 0x00000011, 0x00000010, 0x0000000F, 0x0000000E, 0x0000000D, 0x0000000C,
0x0000000B, 0x0000000A, 0x00000009, 0x00000008, 0x00000007, 0x00000006, 0x00000005, 0x00000004,
0x00000003, 0x00000002, 0x00000001, 0x00000000
};
float resultPositions1[] =
{
0.000000F, 0.000000F, 4.500000F, 0.000000F, 7.429688F, 0.000000F, 13.294922F, 0.000000F,
18.480469F, 0.000000F, 24.345703F, 0.000000F, 34.500000F, 0.000000F, 36.984375F, 0.000000F,
39.468750F, 0.000000F, 42.468750F, 0.000000F, 51.931641F, 0.000000F, 57.796875F, 0.000000F,
60.550781F, 0.000000F, 66.908203F, 0.000000F, 71.636719F, 0.000000F, 74.121094F, 0.000000F,
76.605469F, 0.000000F, 79.605469F, 0.000000F, 85.007813F, 0.000000F, 87.937500F, 0.000000F,
92.666016F, 0.000000F, 99.023438F, 0.000000F, 102.023438F, 0.000000F, 109.083984F, 0.000000F,
111.568359F, 0.000000F, 117.878906F, 0.000000F, 120.878906F, 0.000000F, 128.537109F, 0.000000F,
133.722656F, 0.000000F, 136.652344F, 0.000000F, 143.009766F, 0.000000F, 145.939453F, 0.000000F,
148.939453F, 0.000000F, 152.988281F, 0.000000F, 159.345703F, 0.000000F, 161.830078F, 0.000000F,
167.015625F, 0.000000F, 170.015625F, 0.000000F, 175.880859F, 0.000000F, 178.810547F, 0.000000F,
181.962891F, 0.000000F, 188.332031F, 0.000000F, 191.261719F, 0.000000F, 194.261719F, 0.000000F,
198.316406F, 0.000000F, 201.070313F, 0.000000F, 208.048828F, 0.000000F, 210.978516F, 0.000000F,
213.978516F, 0.000000F, 218.027344F, 0.000000F, 224.384766F, 0.000000F, 229.570313F, 0.000000F,
232.500000F, 0.000000F, 235.500000F, 0.000000F, 239.554688F, 0.000000F, 242.039063F, 0.000000F,
247.224609F, 0.000000F, 250.224609F, 0.000000F, 254.050781F, 0.000000F, 263.513672F, 0.000000F,
269.378906F, 0.000000F, 272.132813F, 0.000000F, 278.490234F, 0.000000F, 283.218750F, 0.000000F,
285.703125F, 0.000000F, 288.187500F, 0.000000F, 291.187500F, 0.000000F, 295.242188F, 0.000000F,
297.996094F, 0.000000F, 301.207031F, 0.000000F, 307.072266F, 0.000000F, 307.072266F, 0.000000F,
313.599609F, 0.000000F, 316.083984F, 0.000000F, 319.083984F, 0.000000F, 322.470703F, 0.000000F,
326.519531F, 0.000000F, 331.921875F, 0.000000F, 334.921875F, 0.000000F, 348.099609F, 0.000000F,
351.029297F, 0.000000F, 361.183594F, 0.000000F, 367.541016F, 0.000000F, 370.470703F, 0.000000F,
375.656250F, 0.000000F, 378.656250F, 0.000000F, 384.521484F, 0.000000F, 387.451172F, 0.000000F,
390.603516F, 0.000000F, 396.972656F, 0.000000F, 399.902344F, 0.000000F, 402.386719F, 0.000000F,
404.871094F, 0.000000F, 407.871094F, 0.000000F, 412.371094F, 0.000000F, 417.099609F, 0.000000F,
424.078125F, 0.000000F, 427.007813F, 0.000000F, 427.007813F, 0.000000F, 433.535156F, 0.000000F,
436.019531F, 0.000000F, 439.019531F, 0.000000F, 447.580078F, 0.000000F, 450.333984F, 0.000000F,
453.263672F, 0.000000F, 457.992188F, 0.000000F, 460.992188F, 0.000000F, 468.205078F, 0.000000F,
470.958984F, 0.000000F, 473.888672F, 0.000000F, 479.291016F, 0.000000F, 482.291016F, 0.000000F,
488.601563F, 0.000000F, 491.355469F, 0.000000F, 496.083984F, 0.000000F, 499.083984F, 0.000000F,
502.910156F, 0.000000F, 507.808594F, 0.000000F, 511.857422F, 0.000000F, 517.042969F, 0.000000F,
521.771484F, 0.000000F, 521.771484F, 0.000000F, 524.701172F, 0.000000F, 529.886719F, 0.000000F,
532.816406F, 0.000000F, 537.714844F, 0.000000F, 540.714844F, 0.000000F, 547.242188F, 0.000000F,
549.726563F, 0.000000F, 555.591797F, 0.000000F, 558.521484F, 0.000000F, 564.878906F, 0.000000F,
567.363281F, 0.000000F, 570.363281F, 0.000000F, 576.439453F, 0.000000F, 579.369141F, 0.000000F,
582.580078F, 0.000000F, 587.765625F, 0.000000F, 590.765625F, 0.000000F, 593.765625F, 0.000000F,
596.519531F, 0.000000F, 601.248047F, 0.000000F, 604.177734F, 0.000000F, 608.906250F, 0.000000F,
611.906250F, 0.000000F, 615.955078F, 0.000000F, 622.312500F, 0.000000F, 624.796875F, 0.000000F,
629.982422F, 0.000000F, 632.982422F, 0.000000F, 639.058594F, 0.000000F, 643.787109F, 0.000000F,
646.271484F, 0.000000F, 649.271484F, 0.000000F, 652.025391F, 0.000000F, 654.955078F, 0.000000F,
657.884766F, 0.000000F, 662.613281F, 0.000000F, 667.341797F, 0.000000F, 670.341797F, 0.000000F,
673.095703F, 0.000000F, 677.824219F, 0.000000F, 681.035156F, 0.000000F, 686.900391F, 0.000000F,
689.900391F, 0.000000F, 696.960938F, 0.000000F, 703.939453F, 0.000000F, 708.667969F, 0.000000F,
708.667969F, 0.000000F, 711.597656F, 0.000000F, 714.597656F, 0.000000F, 720.908203F, 0.000000F,
723.392578F, 0.000000F, 726.392578F, 0.000000F, 730.441406F, 0.000000F, 735.169922F, 0.000000F,
738.099609F, 0.000000F, 741.099609F, 0.000000F, 748.757813F, 0.000000F, 754.623047F, 0.000000F,
760.980469F, 0.000000F, 760.980469F, 0.000000F, 767.507813F, 0.000000F, 769.992188F, 0.000000F,
772.992188F, 0.000000F, 782.455078F, 0.000000F, 788.320313F, 0.000000F, 791.074219F, 0.000000F,
797.431641F, 0.000000F, 802.160156F, 0.000000F, 804.644531F, 0.000000F, 807.128906F, 0.000000F,
812.314453F, 0.000000F, 815.314453F, 0.000000F, 824.777344F, 0.000000F, 830.642578F, 0.000000F,
837.000000F, 0.000000F, 837.000000F, 0.000000F, 843.527344F, 0.000000F, 846.011719F, 0.000000F,
849.011719F, 0.000000F, 855.322266F, 0.000000F, 858.251953F, 0.000000F, 864.117188F, 0.000000F,
870.474609F, 0.000000F, 873.404297F, 0.000000F, 876.333984F, 0.000000F, 879.333984F, 0.000000F,
883.388672F, 0.000000F, 888.574219F, 0.000000F, 891.726563F, 0.000000F, 894.656250F, 0.000000F,
899.841797F, 0.000000F, 902.841797F, 0.000000F, 906.667969F, 0.000000F, 910.722656F, 0.000000F,
913.476563F, 0.000000F, 916.687500F, 0.000000F, 922.552734F, 0.000000F, 922.552734F, 0.000000F,
929.080078F, 0.000000F, 931.564453F, 0.000000F, 934.564453F, 0.000000F, 939.966797F, 0.000000F,
944.695313F, 0.000000F, 947.695313F, 0.000000F, 954.673828F, 0.000000F, 957.826172F, 0.000000F,
961.037109F, 0.000000F, 964.037109F, 0.000000F, 972.597656F, 0.000000F, 975.527344F, 0.000000F,
981.896484F, 0.000000F, 984.380859F, 0.000000F, 989.566406F, 0.000000F, 995.923828F, 0.000000F,
998.408203F, 0.000000F, 1000.892578F, 0.000000F, 1003.892578F, 0.000000F, 1009.968750F, 0.000000F,
1014.697266F, 0.000000F, 1017.451172F, 0.000000F, 1022.179688F, 0.000000F, 1025.109375F, 0.000000F,
1028.039063F, 0.000000F, 1031.039063F, 0.000000F, 1034.865234F, 0.000000F, 1037.619141F, 0.000000F,
1037.619141F, 0.000000F, 1043.988281F, 0.000000F, 1046.742188F, 0.000000F, 1053.111328F, 0.000000F,
1055.595703F, 0.000000F
};
UChar inputText2[] =
{
0x0623, 0x0633, 0x0627, 0x0633, 0x064B, 0x0627, 0x060C, 0x0020,
0x062A, 0x062A, 0x0639, 0x0627, 0x0645, 0x0644, 0x0020, 0x0627,
0x0644, 0x062D, 0x0648, 0x0627, 0x0633, 0x064A, 0x0628, 0x0020,
0x0641, 0x0642, 0x0637, 0x0020, 0x0645, 0x0639, 0x0020, 0x0627,
0x0644, 0x0623, 0x0631, 0x0642, 0x0627, 0x0645, 0x060C, 0x0020,
0x0648, 0x062A, 0x0642, 0x0648, 0x0645, 0x0020, 0x0628, 0x062A,
0x062E, 0x0632, 0x064A, 0x0646, 0x0020, 0x0627, 0x0644, 0x0623,
0x062D, 0x0631, 0x0641, 0x0020, 0x0648, 0x0627, 0x0644, 0x0645,
0x062D, 0x0627, 0x0631, 0x0641, 0x0020, 0x0627, 0x0644, 0x0623,
0x062E, 0x0631, 0x0649, 0x0020, 0x0628, 0x0639, 0x062F, 0x0020,
0x0623, 0x0646, 0x0020, 0x062A, 0x064F, 0x0639, 0x0637, 0x064A,
0x0020, 0x0631, 0x0642, 0x0645, 0x0627, 0x0020, 0x0645, 0x0639,
0x064A, 0x0646, 0x0627, 0x0020, 0x0644, 0x0643, 0x0644, 0x0020,
0x0648, 0x0627, 0x062D, 0x062F, 0x0020, 0x0645, 0x0646, 0x0647,
0x0627, 0x002E, 0x0020, 0x0648, 0x0642, 0x0628, 0x0644, 0x0020,
0x0627, 0x062E, 0x062A, 0x0631, 0x0627, 0x0639, 0x0020, 0x0022,
0x064A, 0x0648, 0x0646, 0x0650, 0x0643, 0x0648, 0x062F, 0x0022,
0x060C, 0x0020, 0x0643, 0x0627, 0x0646, 0x0020, 0x0647, 0x0646,
0x0627, 0x0643, 0x0020, 0x0645, 0x0626, 0x0627, 0x062A, 0x0020,
0x0627, 0x0644, 0x0623, 0x0646, 0x0638, 0x0645, 0x0629, 0x0020,
0x0644, 0x0644, 0x062A, 0x0634, 0x0641, 0x064A, 0x0631, 0x0020,
0x0648, 0x062A, 0x062E, 0x0635, 0x064A, 0x0635, 0x0020, 0x0647,
0x0630, 0x0647, 0x0020, 0x0627, 0x0644, 0x0623, 0x0631, 0x0642,
0x0627, 0x0645, 0x0020, 0x0644, 0x0644, 0x0645, 0x062D, 0x0627,
0x0631, 0x0641, 0x060C, 0x0020, 0x0648, 0x0644, 0x0645, 0x0020,
0x064A, 0x0648, 0x062C, 0x062F, 0x0020, 0x0646, 0x0638, 0x0627,
0x0645, 0x0020, 0x062A, 0x0634, 0x0641, 0x064A, 0x0631, 0x0020,
0x0648, 0x0627, 0x062D, 0x062F, 0x0020, 0x064A, 0x062D, 0x062A,
0x0648, 0x064A, 0x0020, 0x0639, 0x0644, 0x0649, 0x0020, 0x062C,
0x0645, 0x064A, 0x0639, 0x0020, 0x0627, 0x0644, 0x0645, 0x062D,
0x0627, 0x0631, 0x0641, 0x0020, 0x0627, 0x0644, 0x0636, 0x0631,
0x0648, 0x0631, 0x064A, 0x0629
};
uint16_t resultGlyphs2[] =
{
0x07AF, 0x080E, 0x03F1, 0x0403, 0x07C9, 0x07DB, 0x07FA, 0x03E7,
0x0003, 0x03FC, 0x03F1, 0x07A9, 0x07BF, 0x07FF, 0x07FA, 0x03E7,
0x0003, 0x07E5, 0x080F, 0x07FF, 0x07BA, 0x0003, 0x080B, 0x07FB,
0x07E6, 0x0003, 0x0405, 0x0809, 0x07B3, 0x07BF, 0x080E, 0x0003,
0x07C5, 0x07BE, 0x03E7, 0x0403, 0x0003, 0x07C9, 0x080F, 0x07EF,
0x07D3, 0x07B2, 0x0003, 0x0400, 0x07A9, 0x07E3, 0x0802, 0x0003,
0x07C5, 0x07BA, 0x0809, 0x080E, 0x0003, 0x07FD, 0x07FA, 0x0403,
0x0003, 0x03DE, 0x03FC, 0x03F1, 0x07A9, 0x07BF, 0x07FF, 0x07FB,
0x07FA, 0x0003, 0x0400, 0x07A9, 0x07F2, 0x03F1, 0xFFFF, 0x0812,
0x03E7, 0x0003, 0x0402, 0x07C7, 0x0806, 0x0003, 0x07D5, 0x080F,
0x07D7, 0x07C3, 0x07B2, 0x0403, 0x0003, 0x07C9, 0x080F, 0x07EF,
0x07D3, 0x07B3, 0x07FB, 0x07FA, 0x0003, 0x07AF, 0x07FF, 0x07E3,
0x0802, 0xFFFF, 0x0812, 0x03E7, 0x0003, 0x03EA, 0x07A9, 0x07A7,
0x07FE, 0x0003, 0x03FE, 0x07A9, 0x0803, 0x0806, 0x0003, 0x0401,
0x07A9, 0x07F6, 0x0003, 0x03DE, 0x00DF, 0x03EF, 0x0809, 0x07F7,
0x040B, 0x0802, 0x0809, 0x080E, 0x00DF, 0x0003, 0x03F9, 0x03E7,
0x07C9, 0x07B3, 0x07C2, 0x03E7, 0x0003, 0x07F9, 0x07AD, 0x07F2,
0x0403, 0x0003, 0x000E, 0x07A9, 0x0807, 0x0803, 0x07FE, 0x0003,
0x07C5, 0x07BE, 0x03E7, 0x0403, 0x0003, 0x07F9, 0x07F7, 0x07FA,
0x0003, 0x07A9, 0x0803, 0x080F, 0x07E7, 0x07FE, 0x0003, 0x07A9,
0x07FF, 0x07F2, 0x03F1, 0x0003, 0x080D, 0x07DF, 0x07E7, 0x040A,
0x07B2, 0x0003, 0x0401, 0x03E3, 0x0003, 0x07C5, 0x07E7, 0x07AC,
0x0003, 0x0404, 0x07C9, 0x07C2, 0xFFFF, 0x0812, 0x03E7, 0x0003,
0x03FC, 0x03F1, 0x07A9, 0x07BF, 0x07FF, 0x07FA, 0x03E7, 0x0403,
0x0003, 0x03FC, 0x07C9, 0x07BE, 0xFFFF, 0x0812, 0x03E7, 0x0003,
0x0801, 0x080E, 0x07CB, 0x07C3, 0x07B3, 0x07AC, 0x0003, 0x0400,
0x0809, 0x07F3, 0x07B2, 0x0403, 0x0003, 0x03DE, 0x0400, 0x07A9,
0x07F2, 0x03F1, 0xFFFF, 0x0812, 0x03E7, 0x0003, 0x07E5, 0x07FE,
0x0003, 0x07DD, 0x07F3, 0x07EE, 0x0003, 0x07AB, 0x080F, 0x07CE,
0x03E7, 0x0809, 0x07BF, 0x07FA, 0x03E7, 0x0003, 0x07F9, 0x07FE,
0x07A9, 0x07E7, 0x07B3, 0x07B2, 0x0003, 0x03DE, 0x07A9, 0x0406,
0x07CE, 0x07A9, 0x07CE, 0x03E3
};
int32_t resultGlyphCount2 = 252;
int32_t resultIndices2[] =
{
0x000000FB, 0x000000FA, 0x000000F9, 0x000000F8, 0x000000F7, 0x000000F6, 0x000000F5, 0x000000F4,
0x000000F3, 0x000000F2, 0x000000F1, 0x000000F0, 0x000000EF, 0x000000EE, 0x000000ED, 0x000000EC,
0x000000EB, 0x000000EA, 0x000000E9, 0x000000E8, 0x000000E7, 0x000000E6, 0x000000E5, 0x000000E4,
0x000000E3, 0x000000E2, 0x000000E1, 0x000000E0, 0x000000DF, 0x000000DE, 0x000000DD, 0x000000DC,
0x000000DB, 0x000000DA, 0x000000D9, 0x000000D8, 0x000000D7, 0x000000D6, 0x000000D5, 0x000000D4,
0x000000D3, 0x000000D2, 0x000000D1, 0x000000D0, 0x000000CF, 0x000000CE, 0x000000CD, 0x000000CC,
0x000000CB, 0x000000CA, 0x000000C9, 0x000000C8, 0x000000C7, 0x000000C6, 0x000000C5, 0x000000C4,
0x000000C3, 0x000000C2, 0x000000C1, 0x000000C0, 0x000000BF, 0x000000BE, 0x000000BD, 0x000000BC,
0x000000BB, 0x000000BA, 0x000000B9, 0x000000B8, 0x000000B7, 0x000000B6, 0x000000B5, 0x000000B4,
0x000000B3, 0x000000B2, 0x000000B1, 0x000000B0, 0x000000AF, 0x000000AE, 0x000000AD, 0x000000AC,
0x000000AB, 0x000000AA, 0x000000A9, 0x000000A8, 0x000000A7, 0x000000A6, 0x000000A5, 0x000000A4,
0x000000A3, 0x000000A2, 0x000000A1, 0x000000A0, 0x0000009F, 0x0000009E, 0x0000009D, 0x0000009C,
0x0000009B, 0x0000009A, 0x00000099, 0x00000098, 0x00000097, 0x00000096, 0x00000095, 0x00000094,
0x00000093, 0x00000092, 0x00000091, 0x00000090, 0x0000008F, 0x0000008E, 0x0000008D, 0x0000008C,
0x0000008B, 0x0000008A, 0x00000089, 0x00000088, 0x00000087, 0x00000086, 0x00000085, 0x00000084,
0x00000083, 0x00000082, 0x00000081, 0x00000080, 0x0000007F, 0x0000007E, 0x0000007D, 0x0000007C,
0x0000007B, 0x0000007A, 0x00000079, 0x00000078, 0x00000077, 0x00000076, 0x00000075, 0x00000074,
0x00000073, 0x00000072, 0x00000071, 0x00000070, 0x0000006F, 0x0000006E, 0x0000006D, 0x0000006C,
0x0000006B, 0x0000006A, 0x00000069, 0x00000068, 0x00000067, 0x00000066, 0x00000065, 0x00000064,
0x00000063, 0x00000062, 0x00000061, 0x00000060, 0x0000005F, 0x0000005E, 0x0000005D, 0x0000005C,
0x0000005B, 0x0000005A, 0x00000059, 0x00000058, 0x00000057, 0x00000056, 0x00000055, 0x00000054,
0x00000053, 0x00000052, 0x00000051, 0x00000050, 0x0000004F, 0x0000004E, 0x0000004D, 0x0000004C,
0x0000004B, 0x0000004A, 0x00000049, 0x00000048, 0x00000047, 0x00000046, 0x00000045, 0x00000044,
0x00000043, 0x00000042, 0x00000041, 0x00000040, 0x0000003F, 0x0000003E, 0x0000003D, 0x0000003C,
0x0000003B, 0x0000003A, 0x00000039, 0x00000038, 0x00000037, 0x00000036, 0x00000035, 0x00000034,
0x00000033, 0x00000032, 0x00000031, 0x00000030, 0x0000002F, 0x0000002E, 0x0000002D, 0x0000002C,
0x0000002B, 0x0000002A, 0x00000029, 0x00000028, 0x00000027, 0x00000026, 0x00000025, 0x00000024,
0x00000023, 0x00000022, 0x00000021, 0x00000020, 0x0000001F, 0x0000001E, 0x0000001D, 0x0000001C,
0x0000001B, 0x0000001A, 0x00000019, 0x00000018, 0x00000017, 0x00000016, 0x00000015, 0x00000014,
0x00000013, 0x00000012, 0x00000011, 0x00000010, 0x0000000F, 0x0000000E, 0x0000000D, 0x0000000C,
0x0000000B, 0x0000000A, 0x00000009, 0x00000008, 0x00000007, 0x00000006, 0x00000005, 0x00000004,
0x00000003, 0x00000002, 0x00000001, 0x00000000
};
float resultPositions2[] =
{
0.000000F, 0.000000F, 4.927734F, 0.000000F, 8.097656F, 0.000000F, 12.082031F, 0.000000F,
16.406250F, 0.000000F, 21.105469F, 0.000000F, 30.832031F, 0.000000F, 34.160156F, 0.000000F,
36.978516F, 0.000000F, 40.775391F, 0.000000F, 52.482422F, 0.000000F, 56.466797F, 0.000000F,
59.091797F, 0.000000F, 65.853516F, 0.000000F, 71.671875F, 0.000000F, 75.000000F, 0.000000F,
77.818359F, 0.000000F, 81.615234F, 0.000000F, 87.433594F, 0.000000F, 91.324219F, 0.000000F,
97.142578F, 0.000000F, 103.599609F, 0.000000F, 107.396484F, 0.000000F, 116.214844F, 0.000000F,
120.105469F, 0.000000F, 124.875000F, 0.000000F, 128.671875F, 0.000000F, 137.718750F, 0.000000F,
142.119141F, 0.000000F, 146.009766F, 0.000000F, 152.771484F, 0.000000F, 155.941406F, 0.000000F,
159.738281F, 0.000000F, 165.251953F, 0.000000F, 171.708984F, 0.000000F, 174.527344F, 0.000000F,
178.851563F, 0.000000F, 182.648438F, 0.000000F, 187.347656F, 0.000000F, 191.238281F, 0.000000F,
196.253906F, 0.000000F, 206.238281F, 0.000000F, 209.408203F, 0.000000F, 213.205078F, 0.000000F,
218.513672F, 0.000000F, 221.138672F, 0.000000F, 228.328125F, 0.000000F, 231.498047F, 0.000000F,
235.294922F, 0.000000F, 240.808594F, 0.000000F, 247.265625F, 0.000000F, 251.666016F, 0.000000F,
254.835938F, 0.000000F, 258.632813F, 0.000000F, 264.574219F, 0.000000F, 267.902344F, 0.000000F,
272.226563F, 0.000000F, 276.023438F, 0.000000F, 279.820313F, 0.000000F, 291.527344F, 0.000000F,
295.511719F, 0.000000F, 298.136719F, 0.000000F, 304.898438F, 0.000000F, 310.716797F, 0.000000F,
314.607422F, 0.000000F, 317.935547F, 0.000000F, 321.732422F, 0.000000F, 327.041016F, 0.000000F,
329.666016F, 0.000000F, 334.113281F, 0.000000F, 338.097656F, 0.000000F, 338.097656F, 0.000000F,
343.406250F, 0.000000F, 346.224609F, 0.000000F, 350.021484F, 0.000000F, 355.095703F, 0.000000F,
360.609375F, 0.000000F, 366.451172F, 0.000000F, 370.248047F, 0.000000F, 385.494141F, 0.000000F,
389.384766F, 0.000000F, 399.111328F, 0.000000F, 405.873047F, 0.000000F, 409.042969F, 0.000000F,
413.367188F, 0.000000F, 417.164063F, 0.000000F, 421.863281F, 0.000000F, 425.753906F, 0.000000F,
430.769531F, 0.000000F, 440.753906F, 0.000000F, 444.644531F, 0.000000F, 448.535156F, 0.000000F,
451.863281F, 0.000000F, 455.660156F, 0.000000F, 460.587891F, 0.000000F, 466.406250F, 0.000000F,
473.595703F, 0.000000F, 476.765625F, 0.000000F, 476.765625F, 0.000000F, 482.074219F, 0.000000F,
484.892578F, 0.000000F, 488.689453F, 0.000000F, 498.275391F, 0.000000F, 500.900391F, 0.000000F,
504.791016F, 0.000000F, 510.123047F, 0.000000F, 513.919922F, 0.000000F, 524.630859F, 0.000000F,
527.255859F, 0.000000F, 531.146484F, 0.000000F, 536.988281F, 0.000000F, 540.785156F, 0.000000F,
549.187500F, 0.000000F, 551.812500F, 0.000000F, 556.113281F, 0.000000F, 559.910156F, 0.000000F,
563.707031F, 0.000000F, 568.476563F, 0.000000F, 573.445313F, 0.000000F, 577.845703F, 0.000000F,
582.714844F, 0.000000F, 582.714844F, 0.000000F, 585.884766F, 0.000000F, 590.285156F, 0.000000F,
593.455078F, 0.000000F, 598.224609F, 0.000000F, 602.021484F, 0.000000F, 607.839844F, 0.000000F,
610.658203F, 0.000000F, 615.357422F, 0.000000F, 619.248047F, 0.000000F, 625.705078F, 0.000000F,
628.523438F, 0.000000F, 632.320313F, 0.000000F, 641.197266F, 0.000000F, 645.087891F, 0.000000F,
649.535156F, 0.000000F, 653.859375F, 0.000000F, 657.656250F, 0.000000F, 661.453125F, 0.000000F,
664.078125F, 0.000000F, 669.328125F, 0.000000F, 673.218750F, 0.000000F, 678.550781F, 0.000000F,
682.347656F, 0.000000F, 687.861328F, 0.000000F, 694.318359F, 0.000000F, 697.136719F, 0.000000F,
701.460938F, 0.000000F, 705.257813F, 0.000000F, 714.134766F, 0.000000F, 719.003906F, 0.000000F,
722.332031F, 0.000000F, 726.128906F, 0.000000F, 728.753906F, 0.000000F, 732.644531F, 0.000000F,
736.535156F, 0.000000F, 741.779297F, 0.000000F, 747.111328F, 0.000000F, 750.908203F, 0.000000F,
753.533203F, 0.000000F, 759.351563F, 0.000000F, 763.798828F, 0.000000F, 767.783203F, 0.000000F,
771.580078F, 0.000000F, 780.398438F, 0.000000F, 787.587891F, 0.000000F, 792.832031F, 0.000000F,
792.832031F, 0.000000F, 796.001953F, 0.000000F, 799.798828F, 0.000000F, 808.201172F, 0.000000F,
811.019531F, 0.000000F, 814.816406F, 0.000000F, 820.330078F, 0.000000F, 825.574219F, 0.000000F,
828.744141F, 0.000000F, 832.541016F, 0.000000F, 841.587891F, 0.000000F, 846.287109F, 0.000000F,
852.744141F, 0.000000F, 852.744141F, 0.000000F, 858.052734F, 0.000000F, 860.871094F, 0.000000F,
864.667969F, 0.000000F, 876.375000F, 0.000000F, 880.359375F, 0.000000F, 882.984375F, 0.000000F,
889.746094F, 0.000000F, 895.564453F, 0.000000F, 898.892578F, 0.000000F, 901.710938F, 0.000000F,
906.035156F, 0.000000F, 909.832031F, 0.000000F, 921.539063F, 0.000000F, 926.238281F, 0.000000F,
932.695313F, 0.000000F, 932.695313F, 0.000000F, 938.003906F, 0.000000F, 940.822266F, 0.000000F,
944.619141F, 0.000000F, 953.378906F, 0.000000F, 956.548828F, 0.000000F, 961.248047F, 0.000000F,
968.009766F, 0.000000F, 971.900391F, 0.000000F, 975.070313F, 0.000000F, 978.867188F, 0.000000F,
984.175781F, 0.000000F, 988.576172F, 0.000000F, 993.591797F, 0.000000F, 996.761719F, 0.000000F,
1001.085938F, 0.000000F, 1004.882813F, 0.000000F, 1008.679688F, 0.000000F, 1013.988281F, 0.000000F,
1016.613281F, 0.000000F, 1021.060547F, 0.000000F, 1025.044922F, 0.000000F, 1025.044922F, 0.000000F,
1030.353516F, 0.000000F, 1033.171875F, 0.000000F, 1036.968750F, 0.000000F, 1042.787109F, 0.000000F,
1048.119141F, 0.000000F, 1051.916016F, 0.000000F, 1059.626953F, 0.000000F, 1064.642578F, 0.000000F,
1069.089844F, 0.000000F, 1072.886719F, 0.000000F, 1083.908203F, 0.000000F, 1087.798828F, 0.000000F,
1096.710938F, 0.000000F, 1099.529297F, 0.000000F, 1103.929688F, 0.000000F, 1110.691406F, 0.000000F,
1114.019531F, 0.000000F, 1116.837891F, 0.000000F, 1120.634766F, 0.000000F, 1129.511719F, 0.000000F,
1134.843750F, 0.000000F, 1137.468750F, 0.000000F, 1142.712891F, 0.000000F, 1146.603516F, 0.000000F,
1149.773438F, 0.000000F, 1153.570313F, 0.000000F, 1157.367188F, 0.000000F, 1159.992188F, 0.000000F,
1159.992188F, 0.000000F, 1168.904297F, 0.000000F, 1171.529297F, 0.000000F, 1180.441406F, 0.000000F,
1183.259766F, 0.000000F
};
UChar inputText3[] =
{
0x0E1A, 0x0E17, 0x0E17, 0x0E35, 0x0E48, 0x0E51, 0x0E1E, 0x0E32,
0x0E22, 0x0E38, 0x0E44, 0x0E0B, 0x0E42, 0x0E04, 0x0E25, 0x0E19,
0x0E42, 0x0E14, 0x0E42, 0x0E23, 0x0E18, 0x0E35, 0x0E2D, 0x0E32,
0x0E28, 0x0E31, 0x0E22, 0x0E2D, 0x0E22, 0x0E39, 0x0E48, 0x0E17,
0x0E48, 0x0E32, 0x0E21, 0x0E01, 0x0E25, 0x0E32, 0x0E07, 0x0E17,
0x0E38, 0x0E48, 0x0E07, 0x0E43, 0x0E2B, 0x0E0D, 0x0E48, 0x0E43,
0x0E19, 0x0E41, 0x0E04, 0x0E19, 0x0E0B, 0x0E31, 0x0E2A, 0x0E01,
0x0E31, 0x0E1A, 0x0E25, 0x0E38, 0x0E07, 0x0E40, 0x0E2E, 0x0E19,
0x0E23, 0x0E35, 0x0E0A, 0x0E32, 0x0E27, 0x0E44, 0x0E23, 0x0E48,
0x0E41, 0x0E25, 0x0E30, 0x0E1B, 0x0E49, 0x0E32, 0x0E40, 0x0E2D,
0x0E47, 0x0E21, 0x0E20, 0x0E23, 0x0E23, 0x0E22, 0x0E32, 0x0E0A,
0x0E32, 0x0E27, 0x0E44, 0x0E23, 0x0E48, 0x0E1A, 0x0E49, 0x0E32,
0x0E19, 0x0E02, 0x0E2D, 0x0E07, 0x0E1E, 0x0E27, 0x0E01, 0x0E40,
0x0E02, 0x0E32, 0x0E2B, 0x0E25, 0x0E31, 0x0E07, 0x0E40, 0x0E25,
0x0E47, 0x0E01, 0x0E40, 0x0E1E, 0x0E23, 0x0E32, 0x0E30, 0x0E44,
0x0E21, 0x0E49, 0x0E2A, 0x0E23, 0x0E49, 0x0E32, 0x0E07, 0x0E1A,
0x0E49, 0x0E32, 0x0E19, 0x0E15, 0x0E49, 0x0E2D, 0x0E07, 0x0E02,
0x0E19, 0x0E21, 0x0E32, 0x0E14, 0x0E49, 0x0E27, 0x0E22, 0x0E40,
0x0E01, 0x0E27, 0x0E35, 0x0E22, 0x0E19, 0x0E40, 0x0E1B, 0x0E47,
0x0E19, 0x0E23, 0x0E30, 0x0E22, 0x0E30, 0x0E17, 0x0E32, 0x0E07,
0x0E2B, 0x0E25, 0x0E32, 0x0E22, 0x0E44, 0x0E21, 0x0E25, 0x0E4C
};
uint16_t resultGlyphs3[] =
{
0x009C, 0x0099, 0x0099, 0x00B7, 0x00C9, 0x00D2, 0x00A0, 0x00B4,
0x00A4, 0x00BA, 0x00C5, 0x008D, 0x00C3, 0x0086, 0x00A7, 0x009B,
0x00C3, 0x0096, 0x00C3, 0x00A5, 0x009A, 0x00B7, 0x00AF, 0x00B4,
0x00AA, 0x00B3, 0x00A4, 0x00AF, 0x00A4, 0x00BB, 0x0075, 0x0099,
0x0075, 0x00B4, 0x00A3, 0x0083, 0x00A7, 0x00B4, 0x0089, 0x0099,
0x00BA, 0x0075, 0x0089, 0x00C4, 0x00AD, 0x008F, 0x0075, 0x00C4,
0x009B, 0x00C2, 0x0086, 0x009B, 0x008D, 0x00B3, 0x00AC, 0x0083,
0x00B3, 0x009C, 0x00A7, 0x00BA, 0x0089, 0x00C1, 0x00B0, 0x009B,
0x00A5, 0x00B7, 0x008C, 0x00B4, 0x00A9, 0x00C5, 0x00A5, 0x0075,
0x00C2, 0x00A7, 0x00B2, 0x009D, 0x0071, 0x00B4, 0x00C1, 0x00AF,
0x00C8, 0x00A3, 0x00A2, 0x00A5, 0x00A5, 0x00A4, 0x00B4, 0x008C,
0x00B4, 0x00A9, 0x00C5, 0x00A5, 0x0075, 0x009C, 0x0076, 0x00B4,
0x009B, 0x0084, 0x00AF, 0x0089, 0x00A0, 0x00A9, 0x0083, 0x00C1,
0x0084, 0x00B4, 0x00AD, 0x00A7, 0x00B3, 0x0089, 0x00C1, 0x00A7,
0x00C8, 0x0083, 0x00C1, 0x00A0, 0x00A5, 0x00B4, 0x00B2, 0x00C5,
0x00A3, 0x0076, 0x00AC, 0x00A5, 0x0076, 0x00B4, 0x0089, 0x009C,
0x0076, 0x00B4, 0x009B, 0x0097, 0x0076, 0x00AF, 0x0089, 0x0084,
0x009B, 0x00A3, 0x00B4, 0x0096, 0x0076, 0x00A9, 0x00A4, 0x00C1,
0x0083, 0x00A9, 0x00B7, 0x00A4, 0x009B, 0x00C1, 0x009D, 0x007D,
0x009B, 0x00A5, 0x00B2, 0x00A4, 0x00B2, 0x0099, 0x00B4, 0x0089,
0x00AD, 0x00A7, 0x00B4, 0x00A4, 0x00C5, 0x00A3, 0x00A7, 0x0079
};
int32_t resultGlyphCount3 = 168;
int32_t resultIndices3[] =
{
0x00000000, 0x00000001, 0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000006, 0x00000007,
0x00000008, 0x00000009, 0x0000000A, 0x0000000B, 0x0000000C, 0x0000000D, 0x0000000E, 0x0000000F,
0x00000010, 0x00000011, 0x00000012, 0x00000013, 0x00000014, 0x00000015, 0x00000016, 0x00000017,
0x00000018, 0x00000019, 0x0000001A, 0x0000001B, 0x0000001C, 0x0000001D, 0x0000001E, 0x0000001F,
0x00000020, 0x00000021, 0x00000022, 0x00000023, 0x00000024, 0x00000025, 0x00000026, 0x00000027,
0x00000028, 0x00000029, 0x0000002A, 0x0000002B, 0x0000002C, 0x0000002D, 0x0000002E, 0x0000002F,
0x00000030, 0x00000031, 0x00000032, 0x00000033, 0x00000034, 0x00000035, 0x00000036, 0x00000037,
0x00000038, 0x00000039, 0x0000003A, 0x0000003B, 0x0000003C, 0x0000003D, 0x0000003E, 0x0000003F,
0x00000040, 0x00000041, 0x00000042, 0x00000043, 0x00000044, 0x00000045, 0x00000046, 0x00000047,
0x00000048, 0x00000049, 0x0000004A, 0x0000004B, 0x0000004C, 0x0000004D, 0x0000004E, 0x0000004F,
0x00000050, 0x00000051, 0x00000052, 0x00000053, 0x00000054, 0x00000055, 0x00000056, 0x00000057,
0x00000058, 0x00000059, 0x0000005A, 0x0000005B, 0x0000005C, 0x0000005D, 0x0000005E, 0x0000005F,
0x00000060, 0x00000061, 0x00000062, 0x00000063, 0x00000064, 0x00000065, 0x00000066, 0x00000067,
0x00000068, 0x00000069, 0x0000006A, 0x0000006B, 0x0000006C, 0x0000006D, 0x0000006E, 0x0000006F,
0x00000070, 0x00000071, 0x00000072, 0x00000073, 0x00000074, 0x00000075, 0x00000076, 0x00000077,
0x00000078, 0x00000079, 0x0000007A, 0x0000007B, 0x0000007C, 0x0000007D, 0x0000007E, 0x0000007F,
0x00000080, 0x00000081, 0x00000082, 0x00000083, 0x00000084, 0x00000085, 0x00000086, 0x00000087,
0x00000088, 0x00000089, 0x0000008A, 0x0000008B, 0x0000008C, 0x0000008D, 0x0000008E, 0x0000008F,
0x00000090, 0x00000091, 0x00000092, 0x00000093, 0x00000094, 0x00000095, 0x00000096, 0x00000097,
0x00000098, 0x00000099, 0x0000009A, 0x0000009B, 0x0000009C, 0x0000009D, 0x0000009E, 0x0000009F,
0x000000A0, 0x000000A1, 0x000000A2, 0x000000A3, 0x000000A4, 0x000000A5, 0x000000A6, 0x000000A7
};
float resultPositions3[] =
{
0.000000F, 0.000000F, 6.408000F, 0.000000F, 12.816000F, 0.000000F, 19.223999F, 0.000000F,
19.223999F, 0.000000F, 19.223999F, 0.000000F, 25.343998F, 0.000000F, 32.051998F, 0.000000F,
37.595997F, 0.000000F, 43.715996F, 0.000000F, 43.715996F, 0.000000F, 47.795998F, 0.000000F,
53.915997F, 0.000000F, 57.995995F, 0.000000F, 64.115997F, 0.000000F, 70.236000F, 0.000000F,
76.643997F, 0.000000F, 80.723999F, 0.000000F, 86.844002F, 0.000000F, 90.924004F, 0.000000F,
96.468002F, 0.000000F, 102.588005F, 0.000000F, 102.588005F, 0.000000F, 108.708008F, 0.000000F,
114.252007F, 0.000000F, 120.372009F, 0.000000F, 120.372009F, 0.000000F, 126.492012F, 0.000000F,
132.612015F, 0.000000F, 138.732010F, 0.000000F, 138.732010F, 0.000000F, 138.732010F, 0.000000F,
145.140015F, 0.000000F, 145.140015F, 0.000000F, 150.684021F, 0.000000F, 157.092026F, 0.000000F,
163.212021F, 0.000000F, 169.332016F, 0.000000F, 174.876022F, 0.000000F, 180.420029F, 0.000000F,
186.828033F, 0.000000F, 186.828033F, 0.000000F, 186.828033F, 0.000000F, 192.372040F, 0.000000F,
196.452042F, 0.000000F, 202.860046F, 0.000000F, 211.020050F, 0.000000F, 211.020050F, 0.000000F,
215.100052F, 0.000000F, 221.508057F, 0.000000F, 227.628052F, 0.000000F, 233.748047F, 0.000000F,
240.156052F, 0.000000F, 246.276047F, 0.000000F, 246.276047F, 0.000000F, 252.396042F, 0.000000F,
258.516052F, 0.000000F, 258.516052F, 0.000000F, 264.924042F, 0.000000F, 271.044037F, 0.000000F,
271.044037F, 0.000000F, 276.588043F, 0.000000F, 280.080048F, 0.000000F, 286.200043F, 0.000000F,
292.608032F, 0.000000F, 298.152039F, 0.000000F, 298.152039F, 0.000000F, 304.272034F, 0.000000F,
309.816040F, 0.000000F, 315.360046F, 0.000000F, 319.440033F, 0.000000F, 324.984039F, 0.000000F,
324.984039F, 0.000000F, 331.104034F, 0.000000F, 337.224030F, 0.000000F, 342.768036F, 0.000000F,
349.176025F, 0.000000F, 349.176025F, 0.000000F, 354.720032F, 0.000000F, 358.212036F, 0.000000F,
364.332031F, 0.000000F, 364.332031F, 0.000000F, 370.740021F, 0.000000F, 377.148010F, 0.000000F,
382.692017F, 0.000000F, 388.236023F, 0.000000F, 394.356018F, 0.000000F, 399.900024F, 0.000000F,
406.020020F, 0.000000F, 411.564026F, 0.000000F, 417.108032F, 0.000000F, 421.188019F, 0.000000F,
426.732025F, 0.000000F, 426.732025F, 0.000000F, 433.140015F, 0.000000F, 433.140015F, 0.000000F,
438.684021F, 0.000000F, 445.092010F, 0.000000F, 451.212006F, 0.000000F, 457.332001F, 0.000000F,
462.876007F, 0.000000F, 469.584015F, 0.000000F, 475.128021F, 0.000000F, 481.248016F, 0.000000F,
484.740021F, 0.000000F, 490.860016F, 0.000000F, 496.404022F, 0.000000F, 502.812012F, 0.000000F,
508.932007F, 0.000000F, 508.932007F, 0.000000F, 514.476013F, 0.000000F, 517.968018F, 0.000000F,
524.088013F, 0.000000F, 524.088013F, 0.000000F, 530.208008F, 0.000000F, 533.700012F, 0.000000F,
540.408020F, 0.000000F, 545.952026F, 0.000000F, 551.496033F, 0.000000F, 557.040039F, 0.000000F,
561.120056F, 0.000000F, 567.528076F, 0.000000F, 567.528076F, 0.000000F, 573.648071F, 0.000000F,
579.192078F, 0.000000F, 579.192078F, 0.000000F, 584.736084F, 0.000000F, 590.280090F, 0.000000F,
596.688110F, 0.000000F, 596.688110F, 0.000000F, 602.232117F, 0.000000F, 608.640137F, 0.000000F,
614.760132F, 0.000000F, 614.760132F, 0.000000F, 620.880127F, 0.000000F, 626.424133F, 0.000000F,
632.544128F, 0.000000F, 638.952148F, 0.000000F, 645.360168F, 0.000000F, 650.904175F, 0.000000F,
657.024170F, 0.000000F, 657.024170F, 0.000000F, 662.568176F, 0.000000F, 668.688171F, 0.000000F,
672.180176F, 0.000000F, 678.300171F, 0.000000F, 683.844177F, 0.000000F, 683.844177F, 0.000000F,
689.964172F, 0.000000F, 696.372192F, 0.000000F, 699.864197F, 0.000000F, 706.272217F, 0.000000F,
706.272217F, 0.000000F, 712.680237F, 0.000000F, 718.224243F, 0.000000F, 723.768250F, 0.000000F,
729.888245F, 0.000000F, 735.432251F, 0.000000F, 741.840271F, 0.000000F, 747.384277F, 0.000000F,
752.928284F, 0.000000F, 759.336304F, 0.000000F, 765.456299F, 0.000000F, 771.000305F, 0.000000F,
777.120300F, 0.000000F, 781.200317F, 0.000000F, 787.608337F, 0.000000F, 793.728333F, 0.000000F,
793.728333F, 0.000000F
};
TestInput testInputs[] =
{
{"Devamt.ttf", inputText0, 136, Unicode::kDevanagari, false},
{"Times.TTF", inputText1, 252, Unicode::kArabic, true},
{"LucidaSansRegular.ttf", inputText2, 252, Unicode::kArabic, true},
{"Thonburi.ttf", inputText3, 168, Unicode::kThai, false},
};
int32_t testCount = ARRAY_LENGTH(testInputs);
TestResult testResults[] =
{
{resultGlyphCount0, resultGlyphs0, resultIndices0, resultPositions0},
{resultGlyphCount1, resultGlyphs1, resultIndices1, resultPositions1},
{resultGlyphCount2, resultGlyphs2, resultIndices2, resultPositions2},
{resultGlyphCount3, resultGlyphs3, resultIndices3, resultPositions3},
};