this can be null if engine info has not yet been set or if engine info
has been unset, leading to engine crashes. instead of adding null checks in
every engine, better to add the checks to the originating functions
someone with time to kill should go through all the EAPI functions and
add more checks
Summary:
Developers could use fallback fonts using only font_fallbacks keyword.
The keyword is only allowed for Evas Textblock. It has to be common
feature for other text type objects.
Applying this patch, Text and Textgrid can add fallback fonts.
@feature
Test Plan:
Set font like the following example to Textblock, Text, Textgrid.
Sans:fallbacks=Inconsolata
Reviewers: tasn, herdsman, woohyun
Subscribers: cedric, jpeg
Differential Revision: https://phab.enlightenment.org/D3704
Summary:
ULTRABOLD is identical to EXTRABOLD in freetype.
But, "extrabold" word is added for FC_WEIGHT_EXTRABOLD.
So, it has to be changed to use EXTRABOLD instead of
ULTRABOLD. It was mistake in my previous commit.
@fix
Test Plan: N/A
Reviewers: tasn, herdsman, woohyun
Subscribers: cedric, jpeg
Differential Revision: https://phab.enlightenment.org/D3673
Summary:
The configuration files for Fontconfig can describe
how font list is made according to language information.
EFL also set the language for each Evas textblock styles
and used for loading font list.
But, this is inconvenient to use if we want to apply language
for loading font list according to system-wide locale information.
This patch will apply locale information for font list if there is
no specific language in description.
And it also add [lang=auto] for Evas Textblock.
auto - It loads locale for language.
none - It disables language.
@feature
Test Plan: N/A
Reviewers: woohyun, herdsman, tasn
Subscribers: jpeg, cedric
Differential Revision: https://phab.enlightenment.org/D3344
Summary:
If evas engine init failed, it can make crash.
For example
If opengl init failed, then ee->prop.window is 0
ecore_evas_gl_x11_options_new_internal
{
if (!ee->prop.window)
{
ERR("evas_engine_info_set() init engine '%s' failed.", ee->driver);
ecore_evas_free(ee);
return NULL;
}
}
ecore_evas_free calls evas_fonts_zero_pressure
and this time evas->engine.func is NULL so it makes crash.
Reviewers: cedric
Subscribers: cedric, jpeg
Differential Revision: https://phab.enlightenment.org/D3542
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Summary:
eina_list_remove returns Eina_List pointer.
It could be NULL if the last list item is removed.
And the returned Eina_List pointer could be different from the given list.
So, calling free for fdir->data after fdir's address is changed is dangerous.
@fix
Test Plan: Run expedite or test app with evas_font_path_append() API.
Reviewers: stefan_schmidt, jpeg
Reviewed By: jpeg
Subscribers: stefan, jiin.moon, cedric, jpeg
Differential Revision: https://phab.enlightenment.org/D3392
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Summary:
Evas supports UltraLight, UltraBold as font weight.
These terms have same weight value as ExtraLight, ExtraBold.
Some applications, for example, fontforge, use ExtraLight, ExtraBold terms for these weight values.
So, it would be better to support these terms, too.
@feature
Test Plan: None
Reviewers: tasn, woohyun, herdsman
Reviewed By: herdsman
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D3126
Summary:
Reinitialize FontConfig. If FontConfig has to be reinitialized
according to changes of system enviroments(ex. Changing font config files), it will be useful.
Reviewers: woohyun, seoz, tasn, cedric, raster
Reviewed By: raster
Subscribers: raster, herdsman, cedric
Differential Revision: https://phab.enlightenment.org/D1962
this adds a lock for when walking all the objects to generate render
commands for an async render. this allows even the object tree walk
plus update area caluclation to be moved off into async if every oject
that can change canvas state actually does so correctly. this change
adds all those lock block calls to synchronise with an async object
tree walk.
The issue was within the fontconfig fallback mechanism and our cache. We
used to just use the fontconfig fallback list, instead of also using the
correct edje font.
This can probably be improved a bit by not caching the fontconfig set,
but cache a list of the filenames instead. This is more generic and will
improve cache as well.
Fixes T1331
@fix
Summary: Pointer fd is used after being deallocated.
Reviewers: Hermet
Reviewed By: Hermet
CC: seoz, cedric
Differential Revision: https://phab.enlightenment.org/D906
Summary:
These APIs will be used for adding font paths for the application.
The existing APIs for font path, such as evas_font_path_append,
are used for adding font paths to the given evas.
But, these APIs will affect to every evas in the process.
Reviewers: tasn, woohyun, Hermet, seoz
CC: cedric, herdsman
Differential Revision: https://phab.enlightenment.org/D621
@feature
It seems that before 2.10, this was not stable, and was causing issues
to some people. I guess we'll have to bring the dependency back, at
least until we can find a better solution.
This reverts commit ec41f67be4.
This fixes T1006.
Summary:
When the fdesc(Font Description) is duplicated,
ref of all of stringshare pointers should be increased.
But, in the evas_font_desc_dup API, we only increased ref for name string.
It can cause some of memory issues.
Reviewers: tasn, woohyun, seoz, Hermet
CC: cedric
Differential Revision: https://phab.enlightenment.org/D570
This is a long awaited feature that has been requested years ago.
Fontconfig finally added the support needed to make it happen, so here
it is.
I added a fontconfig query to look for similar fonts in case we loaded a
font from eet/edje/file(no fontconfig). This now works quite well.
Still missing: if you load a bold/italic/whatever font directly (set the file)
without putting ":weight=bold" you will not get run-time emboldenment if
only non-bold fonts are found.
This unfortunately depends on very recent fontconfig version (#ifed out
when unavailable), so only people with fontconfig >= 2.11 will enjoy
this feature.
This doesn't work nicely, as for some reason fontconfig doesn't work
nicely with ':spacing=mono' without a font name.
Doesn't work with fc-match either. It does work with fc-list, but that's
not what we'd like to use. It could be just an issue with my local
fontconfig configuration.
This fixes T865 although the problem is now with freetype.
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.
A few days ago I was investigating a bug in the EFL WebKit port and
noticed WebKit's and Evas' handling of Fontconfig are somewhat
incompatible: while the evas_font code calls both FcInit() and FcFini()
when on initialization and shutdown, respectively, WebKit keeps some
Fontconfig objects alive until the process exits. In practice, this
means that shutting Evas down will cause FcFini() to assert because
there are objects which have not been properly destroyed.
This is not really a WebKit-specific problem, as any program which also
uses Fontconfig directly and shuts Evas down before destroying all FC
resources it has allocated is going to crash in the same way.
Other libraries such as Qt, Pango and Cairo do not explicitly initialize
and shut Fontconfig down. Evas itself got this code in r40242 and was
later adjusted in r45829 and r74870.
Since we can't completely control the lifetime of all Fontconfig objects
used in client code, I was thinking of doing the same thing as other
libraries do and get rid of the calls to FcInit() and FcFini(). The part
which is really important is not calling FcFini() -- this was already
done for a while in the r45829 which I mentioned. Valgrind will complain
about some "still reachable" memory blocks, but that's not really
important (as raster said in that revision's commit message, "things may
look like they leak in Valgrind - they dont. in reality").
Note: tasn tried to talk about it with fc guys and it's the
way to go. They won't implemented refcount as suggested in our ml.
Patch by: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
SVN revision: 83605
There's an obvious typo in the function name, so appease my OCD and
rename it.
Patch by: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
SVN revision: 83604
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