fribidi-shape.h 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /* FriBidi
  2. * fribidi-shape.h - shaping
  3. *
  4. * Author:
  5. * Behdad Esfahbod, 2004, 2005
  6. *
  7. * Copyright (C) 2004 Sharif FarsiWeb, Inc
  8. * Copyright (C) 2004, 2005 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_SHAPE_H
  28. #define _FRIBIDI_SHAPE_H
  29. #include "fribidi-types.h"
  30. #include "fribidi-flags.h"
  31. #include "fribidi-bidi-types.h"
  32. #include "fribidi-joining-types.h"
  33. #include "fribidi-begindecls.h"
  34. /* fribidi_shape - do bidi-aware shaping
  35. *
  36. * This function does all shaping work that depends on the resolved embedding
  37. * levels of the characters. Currently it does mirroring and Arabic shaping,
  38. * but the list may grow in the future. This function is a wrapper around
  39. * fribidi_shape_mirroring and fribidi_shape_arabic.
  40. *
  41. * The flags parameter specifies which shapings are applied. The only flags
  42. * affecting the functionality of this function are those beginning with
  43. * FRIBIDI_FLAG_SHAPE_. Of these, only FRIBIDI_FLAG_SHAPE_MIRRORING is on
  44. * in FRIBIDI_FLAGS_DEFAULT. For details of the Arabic-specific flags see
  45. * fribidi_shape_arabic. If ar_props is NULL, no Arabic shaping is performed.
  46. *
  47. * Feel free to do your own shaping before or after calling this function,
  48. * but you should take care of embedding levels yourself then.
  49. */
  50. FRIBIDI_ENTRY void fribidi_shape (
  51. FriBidiFlags flags, /* shaping flags */
  52. const FriBidiLevel *embedding_levels, /* input list of embedding
  53. levels, as returned by
  54. fribidi_get_par_embedding_levels */
  55. const FriBidiStrIndex len, /* input string length */
  56. FriBidiArabicProp *ar_props, /* input/output Arabic properties as
  57. * computed by fribidi_join_arabic */
  58. FriBidiChar *str /* string to shape */
  59. );
  60. #include "fribidi-enddecls.h"
  61. #endif /* !_FRIBIDI_SHAPE_H */
  62. /* Editor directions:
  63. * vim:textwidth=78:tabstop=8:shiftwidth=2:autoindent:cindent
  64. */