os/textandloc/fontservices/textshaperplugin/IcuSource/layout/GlyphPositioningTables.cpp
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
sl@0
     1
/*
sl@0
     2
 *
sl@0
     3
 * (C) Copyright IBM Corp. 1998-2005 - All Rights Reserved
sl@0
     4
 *
sl@0
     5
 */
sl@0
     6
sl@0
     7
#include "LETypes.h"
sl@0
     8
#include "LEFontInstance.h"
sl@0
     9
#include "OpenTypeTables.h"
sl@0
    10
#include "Lookups.h"
sl@0
    11
#include "GlyphDefinitionTables.h"
sl@0
    12
#include "GlyphPositioningTables.h"
sl@0
    13
#include "GlyphPosnLookupProc.h"
sl@0
    14
#include "CursiveAttachmentSubtables.h"
sl@0
    15
#include "LEGlyphStorage.h"
sl@0
    16
#include "GlyphPositionAdjustments.h"
sl@0
    17
sl@0
    18
U_NAMESPACE_BEGIN
sl@0
    19
sl@0
    20
void GlyphPositioningTableHeader::process(LEGlyphStorage &glyphStorage, GlyphPositionAdjustments *glyphPositionAdjustments, le_bool rightToLeft,
sl@0
    21
                                          LETag scriptTag, LETag languageTag,
sl@0
    22
                                          const GlyphDefinitionTableHeader *glyphDefinitionTableHeader,
sl@0
    23
                                          LEErrorCode &success,
sl@0
    24
                                          const LEFontInstance *fontInstance, const LETag *featureOrder) const
sl@0
    25
{
sl@0
    26
    if (LE_FAILURE(success)) {
sl@0
    27
        return;
sl@0
    28
    }
sl@0
    29
sl@0
    30
    GlyphPositioningLookupProcessor processor(this, scriptTag, languageTag, featureOrder);
sl@0
    31
sl@0
    32
    if (processor.isBogus()) {
sl@0
    33
        success = LE_MEMORY_ALLOCATION_ERROR;
sl@0
    34
    	return;
sl@0
    35
    }
sl@0
    36
sl@0
    37
    processor.process(glyphStorage, glyphPositionAdjustments, rightToLeft,
sl@0
    38
    	glyphDefinitionTableHeader, fontInstance, success);
sl@0
    39
sl@0
    40
    glyphPositionAdjustments->applyCursiveAdjustments(glyphStorage, rightToLeft, fontInstance);
sl@0
    41
}
sl@0
    42
sl@0
    43
U_NAMESPACE_END