forked from enlightenment/efl
Evas font-engine: Moved bidi utils (and added script utils) to a subdir language that collects all the language specific adjustments to font handling.
SVN revision: 56446
This commit is contained in:
parent
05050572ad
commit
7e376019b7
|
@ -2477,9 +2477,13 @@ _layout_text_add_and_split_item(Ctxt *c, Evas_Object_Textblock_Format *fmt,
|
|||
do
|
||||
{
|
||||
Evas_Object_Textblock_Text_Item *new_ti;
|
||||
/* FIXME: We assume here that it's ok to have an empty item with
|
||||
* no text nodes, make sure it's the case. */
|
||||
if (ti->parent.text_node)
|
||||
{
|
||||
cutoff = evas_bidi_end_of_run_get(ti->parent.text_node->bidi_props,
|
||||
cutoff = evas_common_script_end_of_run_get(
|
||||
eina_ustrbuf_string_get(ti->parent.text_node->unicode),
|
||||
ti->parent.text_node->bidi_props,
|
||||
ti->parent.text_pos, len);
|
||||
if (cutoff > 0)
|
||||
{
|
||||
|
|
|
@ -59,7 +59,8 @@ evas_scale_span.c \
|
|||
evas_tiler.c \
|
||||
evas_regionbuf.c \
|
||||
evas_pipe.c \
|
||||
evas_bidi_utils.c \
|
||||
language/evas_bidi_utils.c \
|
||||
language/evas_script_utils.c \
|
||||
evas_map_image.c \
|
||||
evas_map_image.h
|
||||
|
||||
|
@ -98,7 +99,8 @@ evas_scale_smooth_scaler_noscale.c \
|
|||
evas_scale_smooth_scaler_up.c \
|
||||
evas_scale_span.h \
|
||||
evas_pipe.h \
|
||||
evas_bidi_utils.h \
|
||||
language/evas_bidi_utils.h \
|
||||
language/evas_script_utils.h \
|
||||
evas_map_image_internal.c \
|
||||
evas_map_image_core.c \
|
||||
evas_map_image_loop.c
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#ifndef _EVAS_FONT_H
|
||||
#define _EVAS_FONT_H
|
||||
#include "evas_bidi_utils.h"
|
||||
#include "language/evas_bidi_utils.h"
|
||||
|
||||
|
||||
/* main */
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#include "evas_private.h"
|
||||
#include "evas_blend_private.h"
|
||||
|
||||
#include "evas_bidi_utils.h" /*defines BIDI_SUPPORT if possible */
|
||||
#include "language/evas_bidi_utils.h" /*defines BIDI_SUPPORT if possible */
|
||||
#include "evas_font_private.h" /* for Frame-Queuing support */
|
||||
|
||||
#define WORD_CACHE_MAXLEN 50
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "evas_common.h"
|
||||
#include "evas_bidi_utils.h" /*defines BIDI_SUPPORT if possible */
|
||||
#include "language/evas_bidi_utils.h" /*defines BIDI_SUPPORT if possible */
|
||||
#include "evas_font_private.h" /* for Frame-Queuing support */
|
||||
|
||||
EAPI int
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#ifndef _EVAS_PIPE_H
|
||||
#define _EVAS_PIPE_H
|
||||
#include "evas_bidi_utils.h"
|
||||
#include "language/evas_bidi_utils.h"
|
||||
|
||||
#ifdef BUILD_PTHREAD
|
||||
typedef struct _Thinfo
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
#endif
|
||||
|
||||
#include <Eina.h>
|
||||
#include "evas_common.h"
|
||||
|
||||
#ifdef USE_FRIBIDI
|
||||
# include <fribidi/fribidi.h>
|
||||
|
@ -75,6 +74,7 @@ struct _Evas_BiDi_Paragraph_Props {
|
|||
#endif
|
||||
};
|
||||
|
||||
#include "evas_common.h"
|
||||
struct _Evas_BiDi_Props {
|
||||
Evas_BiDi_Direction dir;
|
||||
};
|
|
@ -0,0 +1,40 @@
|
|||
/**
|
||||
* @internal
|
||||
* @addtogroup Evas_Utils
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
/**
|
||||
* @internal
|
||||
* @defgroup Evas_Script Evas Script (language) utility functions
|
||||
*
|
||||
* This set of functions and types helps evas handle scripts correctly.
|
||||
* @todo Document types, structures and macros.
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
#include <Eina.h>
|
||||
|
||||
#include "evas_script_utils.h"
|
||||
#include "evas_bidi_utils.h" /* Used for fallback. */
|
||||
int
|
||||
evas_common_script_end_of_run_get(const Eina_Unicode *str,
|
||||
const Evas_BiDi_Paragraph_Props *bidi_props, size_t start, int len)
|
||||
{
|
||||
/* FIXME: Currently we fall back to bidi runs, should fix */
|
||||
(void) str;
|
||||
#ifdef BIDI_SUPPORT
|
||||
return evas_bidi_end_of_run_get(bidi_props, start, len);
|
||||
#else
|
||||
(void) bidi_props;
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
* @}
|
||||
*/
|
||||
/*
|
||||
* @}
|
||||
*/
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
#ifndef _EVAS_SCRIPT_UTILS
|
||||
#define _EVAS_SCRIPT_UTILS
|
||||
|
||||
#include <Eina.h>
|
||||
#include "evas_bidi_utils.h"
|
||||
|
||||
int
|
||||
evas_common_script_end_of_run_get(const Eina_Unicode *str, const Evas_BiDi_Paragraph_Props *bidi_props, size_t start, int len);
|
||||
|
||||
#endif
|
||||
|
|
@ -688,7 +688,7 @@ struct _RGBA_Draw_Context
|
|||
|
||||
#ifdef BUILD_PIPE_RENDER
|
||||
#include "../engines/common/evas_map_image.h"
|
||||
#include "../engines/common/evas_bidi_utils.h"
|
||||
#include "../engines/common/language/evas_bidi_utils.h"
|
||||
|
||||
struct _RGBA_Pipe_Op
|
||||
{
|
||||
|
|
|
@ -11,7 +11,8 @@
|
|||
|
||||
#include "../file/evas_module.h"
|
||||
#include "../file/evas_path.h"
|
||||
#include "../engines/common/evas_bidi_utils.h"
|
||||
#include "../engines/common/language/evas_bidi_utils.h"
|
||||
#include "../engines/common/language/evas_script_utils.h"
|
||||
|
||||
#ifdef EVAS_MAGIC_DEBUG
|
||||
/* complain when peole pass in wrong object types etc. */
|
||||
|
|
Loading…
Reference in New Issue