fribidi-joining.h 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. /* FriBidi
  2. * fribidi-joining.h - Arabic joining algorithm
  3. *
  4. * Authors:
  5. * Behdad Esfahbod, 2004
  6. *
  7. * Copyright (C) 2004 Sharif FarsiWeb, Inc
  8. * Copyright (C) 2004 Behdad Esfahbod
  9. *
  10. * This library is free software; you can redistribute it and/or
  11. * modify it under the terms of the GNU Lesser General Public
  12. * License as published by the Free Software Foundation; either
  13. * version 2.1 of the License, or (at your option) any later version.
  14. *
  15. * This library is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  18. * Lesser General Public License for more details.
  19. *
  20. * You should have received a copy of the GNU Lesser General Public License
  21. * along with this library, in a file named COPYING; if not, write to the
  22. * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  23. * Boston, MA 02110-1301, USA
  24. *
  25. * For licensing issues, contact <fribidi.license@gmail.com>.
  26. */
  27. #ifndef _FRIBIDI_JOINING_H
  28. #define _FRIBIDI_JOINING_H
  29. #include "fribidi-common.h"
  30. #include "fribidi-types.h"
  31. #include "fribidi-bidi-types.h"
  32. #include "fribidi-joining-types.h"
  33. #include "fribidi-begindecls.h"
  34. /* fribidi_join_arabic - do Arabic joining
  35. *
  36. * This function does the Arabic joining algorithm. Means, given Arabic
  37. * joining types of the characters in ar_props (don't worry,
  38. * FriBidiJoiningType can be casted to FriBidiArabicProp automagically), this
  39. * function modifies this properties to grasp the effect of neighboring
  40. * characters. You probably need this information later to do Arabic shaping.
  41. *
  42. * This function implements rules R1 to R7 inclusive (all rules) of the Arabic
  43. * Cursive Joining algorithm of the Unicode standard as available at
  44. * http://www.unicode.org/versions/Unicode4.0.0/ch08.pdf#G7462. It also
  45. * interacts correctly with the bidirection algorithm as defined in Section
  46. * 3.5 Shaping of the Unicode Bidirectional Algorithm available at
  47. * http://www.unicode.org/reports/tr9/#Shaping.
  48. *
  49. * There are a few macros defined in fribidi-joining-types.h for querying the
  50. * Arabic properties computed by this function.
  51. */
  52. FRIBIDI_ENTRY void fribidi_join_arabic (
  53. const FriBidiCharType *bidi_types, /* input list of bidi types as
  54. returned by
  55. fribidi_get_bidi_types() */
  56. const FriBidiStrIndex len, /* input string length */
  57. const FriBidiLevel *embedding_levels, /* input list of embedding
  58. levels, as returned by
  59. fribidi_get_par_embedding_levels */
  60. FriBidiArabicProp *ar_props /* Arabic properties to analyze, initialized by
  61. joining types, as returned by
  62. fribidi_get_joining_types */
  63. );
  64. #include "fribidi-enddecls.h"
  65. #endif /* !_FRIBIDI_JOINING_H */
  66. /* Editor directions:
  67. * vim:textwidth=78:tabstop=8:shiftwidth=2:autoindent:cindent
  68. */