Commit Graph

30 Commits

Author SHA1 Message Date
Mike Blumenkrantz 3b161da0ce evas/language: #ifdef guard variable which is only used inside #ifdef
Summary:
this variable is already only changed inside an #ifdef, so declare and
free it only inside the same ifdef for clarity

ref 9d9aa8b6ae
CID 1400807

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10389
2019-10-18 13:28:41 -04:00
Mike Blumenkrantz 9d9aa8b6ae evas/language: #ifdef guard variable which is only used inside #ifdef
Summary:
this variable is already only changed inside an #ifdef, so declare and
free it only inside the same ifdef for clarity

CIDs 1401016, 1400807

Reviewers: cedric

Reviewed By: cedric

Subscribers: bu5hm4n, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10320
2019-10-11 10:03:17 -04:00
Vincent Torri 24e4881efb Evas: remove Evil.h when not needed and use evil_private when needed
Test Plan: compilation

Reviewers: zmike, raster, cedric

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8921
2019-05-20 08:46:02 -04:00
Marcel Hollerbach 46d464e5bf here comes meson
a new shiny buildtool that currently completes in the total of ~ 4 min..
1 min. conf time
2:30 min. build time
Where autotools takes:
1:50 min. conf time
3:40 min. build time.

meson was taken because it went quite good for enlightenment, and is a traction gaining system that is also used by other mayor projects. Additionally, the DSL that is defined my meson makes the configuration of the builds a lot easier to read.

Further informations can be gathered from the README.meson

Right now, bindings & windows support are missing.

It is highly recommented to use meson 0.48 due to optimizations in meson
that reduced the time the meson call would need.

Co-authored-by: Mike Blumenkrantz <zmike@samsung.com>

Differential Revision: https://phab.enlightenment.org/D7012
Depends on D7011
2018-10-02 17:22:50 +02:00
Youngbok Shin 4c36461233 evas: apply fribidi bracket types to show paired bracket properly
Summary:
The fribidi couldn't reorganize paired brackets (Ex. '(', ')')
when there is RTL + LTR text. According to TR9(http://www.unicode.org/reports/tr9/),
it has to be shown properly without LRM or RLM.

Also, from the fribidi 1.0.0, fribidi_get_par_embedding_levels() was deprecated.
It is replaced with fribidi_get_par_embedding_levels_ex() which is including
paired brankets rules from TR9.

@feature

Test Plan:
1. Create a elm_entry.
2. Set a text by calling text_set.
   elm_entry_entry_set(entry, "مرحبا Hello (40)");
3. Run and see the results.
   - Without this patch or fribidi 1.X.X, it will show text like this...
     "(Hello (40 مرحبا"

   - With this patch and fribidi >= 1.0.0
     "Hello (40) مرحبا"

Reviewers: raster, cedric, herdsman, woohyun

Reviewed By: herdsman

Differential Revision: https://phab.enlightenment.org/D5921
2018-04-12 12:55:26 +03:00
Subodh Kumar a8e7cf74b1 evas: there is no effect of variable assignment while clean up.
Summary:
There is no effect of assingning a variable while clean up.
@fix

Reviewers: raster, cedric

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5272

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2017-10-09 16:41:23 -07:00
Vincent Torri 0cdd501246 EFL For WIN32: Replace HAVE_EVIL define with _WIN32 2017-09-22 05:06:10 -05:00
Jaehyun Cho 618c123341 evas_language_utils: Fix build error without NLS 2017-09-06 11:19:28 +09:00
Youngbok Shin cbea6e4386 evas textblock: add align=locale option to respect locale's direction
Summary:
There are many requests to add a new feature for handling horizontal align
according to current locale. For example, in RTL locale setting,
users want to see right aligned text for every list's item.
Even if some of list's items only contain LTR characters!
It is useful for the needs.
@feature

Test Plan: N/A

Reviewers: herdsman, tasn, woohyun, raster, cedric

Reviewed By: herdsman, raster

Subscribers: z-wony, jpeg

Differential Revision: https://phab.enlightenment.org/D4664
2017-06-15 08:59:17 +03:00
Carsten Haitzler 51b2789a35 evas lang unicode tables - reduce memory by 24k+1324 bytes
so bu5hman pointed out a compile warning from clang that

 { 0x20000, 42711, EVAS_SCRIPT_HAN },

has 42711 exceeding a signed short. true. so this should be an
unsigned short. but this drew me to the fact the whole array could be
shorter by packing this short with the style memeber after it making
them pack into a nicely aligned 4 byte chunk next to the start unicode
value before it, thus chopping 1324 bytes off this table. even worse
the 8192 entry fast table above is using a full 32bits per entry where
they data they store is not even exceeding 7bits, so move this to an
unsigned char saving another 24k. this should reduce cache misses and
memory footprint and binary footprint of the evas .so files etc.

@fix + @optimize
2016-11-03 22:22:54 +09:00
Tom Hacohen 8203c79678 Evas langauge: Prevent potential buffer overflow and clean code.
We were copying a user defined string into a fixed size buffer
without doing any boundary checks. This commit fixes that.
Also cleaned up similar code that was using hardcoded numbers.

@fix.
2016-04-08 11:34:53 +01:00
Youngbok Shin f4f9753c20 Evas: Add API to reinit the language and use it in elementary.
Summary:
evas_common_language_from_locale_* functions kept static pointers
inside of its functions. Once these function was called, it was never reset.
It made big problems for harfbuzz and hyphenation. Also, Elementary
provides elm_language_set() API. Then we need to support it fully.
@fix

Test Plan: Test case for hyphenation is included in Evas test suite.

Reviewers: raster, tasn, herdsman, woohyun, z-wony, Blackmole, minudf

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D3864
2016-04-08 11:24:32 +01:00
Vincent Torri db8d1883d7 Evas: use LC_MESSAGES on Windows to fix compilation
Compilation is broken on Windows because LC_MESSAGES does not exist on this platform
Include Evil.h to provide support of LC_MESSAGES

@fix
2015-11-30 16:28:02 +00:00
Youngbok Shin a9b4be11e1 Evas object: Add paragraph_direciton APIs
Summary:
It adds evas_object_paragraph_direction_set, get APIs.
The APIs set or get paragraph direction to/from the given object.
It changes BiDi calculations and affect the direction and aligning of text.
It doesn't have any effect to text without Fribidi library.

The default paragraph direction is EVAS_BIDI_DIRECTION_INHERIT.
If dir is EVAS_BIDI_DIRECTION_INHERIT, paragraph direction is changed
according to smart parent object. If there is no smart parent object,
paragraph direction works as EVAS_BIDI_DIRECTION_NEUTRAL.

@feature

Test Plan:
Test cases included to the following files.
- evas_test_textblock.c
- evas_test_text.c
- evas_test_object_smart.c

Run "make check".

Reviewers: woohyun, raster, herdsman, tasn

Subscribers: c, raster, cedric

Differential Revision: https://phab.enlightenment.org/D1690
2015-11-19 11:43:39 +00:00
Daniel Hirt 4c086b6e1b Evas language: add full locale language getter
evas_common_language_from_locale_get truncates the country letters in
the language. We don't always want that (one example is dictionaries).
2015-11-17 16:20:21 +02:00
Tom Hacohen 8fcf9a0fe6 Evas language: Fix language from locale function.
This function was trying to infer from the LANG env var, though it should
have just queried the locale all along, as the language we want is the
system's text language, and not necessarily the LANG variable's value.

@fix.
2015-11-17 12:07:42 +00:00
Daniel Hirt a197aa366b Evas language: fix script run code
For script runs that start with an UNKNOWN character, the whole
run was mistakenly identified as script type UNKNOWN.

Also, refactored code a bit for readability.

Fixes T2670.
@fix
2015-08-19 17:16:42 +03:00
Tom Hacohen 5d021658ad Evas bidi: Make code more explicit (silence coverity).
CID1039922.
2014-08-12 10:05:52 +01:00
Tom Hacohen 041e3af3e5 Evas bidi: Fixed a bug causing BiDi not to work in some cases.
This issue cause non-letter RTL characters not to be detected as RTL
which in turn turned off bidi for those strings.
Example broken text: <RLM><LRO>[PAS<RLO>[--DES<PDF><PDF>.

Thanks to Yakov Goldberg for reporting this issue.
2013-08-27 14:11:16 +01:00
Chris Michael eabc1482f9 Fix memleak reported by Coverity.
NB: Fixes Coverity CID1039657

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-08 08:35:33 +01:00
Sebastian Dransfeld 51023d2d4f evas: Keep sane name for public header
Evas_Common.h should be used for the public header, and rather rename
evas_common.h internal header to another name.

Sa:
Evas_Common_Header.h -> Evas_Common.h
evas_common.h -> evas_common_private.h

Shouldn't have both Evas_Common.h and evas_common.h because of case
insensitive filesystems.
2013-06-20 12:53:29 +02:00
Tom Hacohen 311dab3fee Evas language: Handle signed wchar_t in a nicer way. 2013-05-16 09:56:17 +01:00
Carsten Haitzler ab0fdf5916 it is possible with wchart_t to have it signed.. so unicode can be <
0... dont crash.
2013-04-30 23:11:01 +09:00
Tom Hacohen 26a5cdc63b Evas language: Fixed compiler warning about unsigned comparison.
comparison of unsigned expression >= 0 is always true.

Thanks to vtorri for the report.
2013-03-12 11:17:17 +00:00
Tom Hacohen d6dababe78 Evas text: Fixed bug with the text object direction detection. 2013-02-21 13:39:37 +00:00
Carsten Haitzler 7f1fb9b10d thanks joel.
SVN revision: 82254
2013-01-05 02:20:13 +00:00
Stefan Schmidt 8d956c8e99 efl/evas_bidi: Fix memleak.
Make sure we also free udelmin when we retrun from from the for loop early.

SVN revision: 81334
2012-12-19 09:28:02 +00:00
Stefan Schmidt 2dc790bf47 evas/bidi: Make sure we access the correct memory here.
Without that it would crash as we just freed it and assigned the realloc
code to tmp_ret.

SVN revision: 80863
2012-12-13 14:17:33 +00:00
Carsten Haitzler 0462ae7dda this is a new segv... get it with e17's language selector in wizard! :(
SVN revision: 79027
2012-11-09 15:02:39 +00:00
Vincent Torri c15e9c6575 merge: and now Evas
I've tested make -j 3 install and it works nicely

I've tested expedite with software and opengl xlib,
and it works. Not tested other engines, so please
report any problems (engines or other) on the ML.

TODO: examples and tests, I'll add them later

ISSUE: Eina_Unicode size check. It indirectly depends on
       eina_config.h, which is created at the end of the
       configure script. So its size is always 0. I don't
       know how that size is used, so I can't do a lot,
       for now.


SVN revision: 78895
2012-11-04 11:51:42 +00:00