Home | History | Annotate | Download | only in fxcrt
      1 // Copyright 2014 PDFium Authors. All rights reserved.
      2 // Use of this source code is governed by a BSD-style license that can be
      3 // found in the LICENSE file.
      4 
      5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
      6 
      7 #ifndef CORE_FXCRT_FX_ARB_H_
      8 #define CORE_FXCRT_FX_ARB_H_
      9 
     10 #include <vector>
     11 
     12 #include "core/fxcrt/fx_system.h"
     13 #include "core/fxcrt/fx_ucd.h"
     14 
     15 struct FX_ARBFORMTABLE {
     16   uint16_t wIsolated;
     17   uint16_t wFinal;
     18   uint16_t wInitial;
     19   uint16_t wMedial;
     20 };
     21 
     22 struct FX_ARAALEF {
     23   uint16_t wAlef;
     24   uint16_t wIsolated;
     25 };
     26 
     27 struct FX_ARASHADDA {
     28   uint16_t wShadda;
     29   uint16_t wIsolated;
     30 };
     31 
     32 const FX_ARBFORMTABLE* FX_GetArabicFormTable(FX_WCHAR unicode);
     33 FX_WCHAR FX_GetArabicFromAlefTable(FX_WCHAR alef);
     34 FX_WCHAR FX_GetArabicFromShaddaTable(FX_WCHAR shadda);
     35 
     36 enum FX_ARBPOSITION {
     37   FX_ARBPOSITION_Isolated = 0,
     38   FX_ARBPOSITION_Final,
     39   FX_ARBPOSITION_Initial,
     40   FX_ARBPOSITION_Medial,
     41 };
     42 
     43 void FX_BidiLine(CFX_WideString& wsText, int32_t iBaseLevel = 0);
     44 void FX_BidiLine(std::vector<CFX_TxtChar>& chars,
     45                  int32_t iCount,
     46                  int32_t iBaseLevel = 0);
     47 void FX_BidiLine(std::vector<CFX_RTFChar>& chars,
     48                  int32_t iCount,
     49                  int32_t iBaseLevel = 0);
     50 
     51 #endif  // CORE_FXCRT_FX_ARB_H_
     52