HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Moduletext-icu-0.8.0.5Haskell98

Data.Text.ICU.Shape

Bindings for arabic shaping, implemented as bindings to the International Components for Unicode (ICU) libraries.

  • 1 type
  • 1 value
  • Packagetext-icu-0.8.0.5
  • Exports2
  • LanguageHaskell98
  • LicenceBSD-3-Clause
  • SourceShape.hsc
valueshapeArabic :: [ShapeOption] -> Text -> Text
#

Shape Arabic text on a character basis.

Text-based shaping means that some character codepoints in the text are replaced by others depending on the context. It transforms one kind of text into another. In comparison, modern displays for Arabic text select appropriate, context-dependent font glyphs for each text element, which means that they transform text into a glyph vector.

You probably want to call this with the LettersShape option in the default case.

datadata ShapeOption
#

Options for the shapeArabic function.

Constructors

  • AggregateTaskheel

    Tashkeel aggregation option: Replaces any combination of U+0651 with one of U+064C, U+064D, U+064E, U+064F, U+0650 with U+FC5E, U+FC5F, U+FC60, U+FC61, U+FC62 consecutively.

  • DigitTypeAnExtended

    Digit type option: Use Eastern (Extended) Arabic-Indic digits (U+06f0...U+06f9).

  • DigitsAlen2AnInitAl

    Replace European digits (U+0030...) by Arabic-Indic digits if the most recent strongly directional character is an Arabic letter (u_charDirection() result U_RIGHT_TO_LEFT_ARABIC [AL]).

  • DigitsAlen2AnInitLr

    Digit shaping option: Replace European digits (U+0030...) by Arabic-Indic digits if the most recent strongly directional character is an Arabic letter (u_charDirection() result U_RIGHT_TO_LEFT_ARABIC [AL]).

  • DigitsAn2En

    Digit shaping option: Replace Arabic-Indic digits by European digits (U+0030...).

  • DigitsEn2An

    Digit shaping option: Replace European digits (U+0030...) by Arabic-Indic digits.

  • LengthFixedSpacesAtBeginning

    If more room is necessary, then try to consume spaces at the beginning of the text.

  • LengthFixedSpacesAtEnd

    If more room is necessary, then try to consume spaces at the end of the text.

  • LengthFixedSpacesNear

    If more room is necessary, then try to consume spaces next to modified characters.

  • LettersShape

    Letter shaping option: replace abstract letter characters by "shaped" ones.

  • LettersUnshape

    Letter shaping option: replace "shaped" letter characters by abstract ones.

  • LettersShapeTashkeelIsolated

    The only difference with LettersShape is that Tashkeel letters are always "shaped" into the isolated form instead of the medial form (selecting codepoints from the Arabic Presentation Forms-B block).

  • PreservePresentation

    Presentation form option: Don't replace Arabic Presentation Forms-A and Arabic Presentation Forms-B characters with 0+06xx characters, before shaping.

  • TextDirectionVisualLTR

    Direction indicator: the source is in visual LTR order, the leftmost displayed character stored first.

Instances1Show