1 /*
   2  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   3  *
   4  * This code is free software; you can redistribute it and/or modify it
   5  * under the terms of the GNU General Public License version 2 only, as
   6  * published by the Free Software Foundation.  Oracle designates this
   7  * particular file as subject to the "Classpath" exception as provided
   8  * by Oracle in the LICENSE file that accompanied this code.
   9  *
  10  * This code is distributed in the hope that it will be useful, but WITHOUT
  11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  12  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  13  * version 2 for more details (a copy is included in the LICENSE file that
  14  * accompanied this code).
  15  *
  16  * You should have received a copy of the GNU General Public License version
  17  * 2 along with this work; if not, write to the Free Software Foundation,
  18  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  19  *
  20  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  21  * or visit www.oracle.com if you need additional information or have any
  22  * questions.
  23  *
  24  */
  25 
  26 /*
  27  *
  28  *
  29  * (C) Copyright IBM Corp. 2004-2013 - All Rights Reserved
  30  *
  31  */
  32 
  33 #ifndef __KERNTABLE_H
  34 #define __KERNTABLE_H
  35 
  36 #ifndef __LETYPES_H
  37 #include "LETypes.h"
  38 #endif
  39 
  40 #include "LETypes.h"
  41 #include "LETableReference.h"
  42 //#include "LEFontInstance.h"
  43 //#include "LEGlyphStorage.h"
  44 
  45 #include <stdio.h>
  46 
  47 U_NAMESPACE_BEGIN
  48 struct PairInfo;
  49 class  LEFontInstance;
  50 class  LEGlyphStorage;
  51 
  52 /**
  53  * Windows type 0 kerning table support only for now.
  54  */
  55 class U_LAYOUT_API KernTable
  56 {
  57  private:
  58   le_uint16 coverage;
  59   le_uint16 nPairs;
  60   LEReferenceToArrayOf<PairInfo> pairs;
  61   PairInfo  *pairsSwapped;
  62   const LETableReference &fTable;
  63   le_uint16 searchRange;
  64   le_uint16 entrySelector;
  65   le_uint16 rangeShift;
  66 
  67  public:
  68   KernTable(const LETableReference &table, LEErrorCode &success);
  69 
  70   /*
  71    * Process the glyph positions.
  72    */
  73   void process(LEGlyphStorage& storage, LEErrorCode &success);
  74 };
  75 
  76 U_NAMESPACE_END
  77 
  78 #endif
--- EOF ---