You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unfortunately, I have lost contact with @blackwarthog and I think he will not continue working on Text Layer. At the same time there are no license in his code repo, so I think we do not have permission to use that code directly.
Looks like it allows to deform. In Synfig 1.0.2 there was cairo-based render engine, which was using Pango.
I have tested and it renders Arabic text correctly (with deformation) -
Pango should be much less work to integrate (especially if you already use Cairo), and provides many needed features (RTL, font fallabck, line breaking, etc). HarfBuzz is much lower level than Pango, and will require a bit of work (and additional libraries) to get the same features.
Anyway, I tested a simple/draft implementation by using pango yesterday.
I did wish to avoid it, to reduce the synfig library dependencies (keep them at low number).
However, I don't have time now to think on how to deal BiDi texts. And cairo/pango are somehow still as a dependency for the core library.
UPDATE: The client company has flushed away. ^__^ I have implemented a sound export feature for them, but they didn't paid according to our previous agreement. Well, we have a great feature anyway! 🤣
And now I'm having this problem even in master branch, even after deleting _debug folder… :(
/home/rodolfo/projetos/synfig/synfig-studio/src/gui/dialogs/about.cpp: In constructor ‘studio::About::About()’:
/home/rodolfo/projetos/synfig/synfig-studio/src/gui/dialogs/about.cpp:247:46: error: ‘ETL_VERSION’ was not declared in this scope; did you mean ‘FC_VERSION’?
247 | extra_info += etl::strprintf(_("ETL %s\n"), ETL_VERSION);
| ^~~~~~~~~~~
| FC_VERSION
make[3]: *** [Makefile:1909: dialogs/synfigstudio-about.o] Error 1
I tried it too :( production version works. Debug version after cloning repo to another path too.
I figured it out: The problem was that try I did by following the CMake instructions. It polluted my source folder (with CMakeFiles dirs, Makefile, .cmake and .cmake.in files) instead of using the suggested cmake-build dir.
Besides, it created a etl_profile.h in (source-dir)/ETL/ETL/ that is completely different of that generated by Autotools (and it misses the ETL_version definition).
I'm sorry I stopped to work on this due to my difficult to make the pango implementation compatible to current implementation (coordinates, size, and features).
I may (try to) work more on it later, but not now.
Activity
rodolforg commentedon Aug 10, 2020
Hm… important thing: what's wrong with current 'support'?
How is it currently rendered?
What is the used charset?
morevnaproject commentedon Aug 12, 2020
I tested on Linux and see that it displays symbols in reverse sequence (this is because the text should be RTL) -

arabic-text.sifz.zip
morevnaproject commentedon Aug 12, 2020
...and here is how it looks on Windows:

rodolforg commentedon Aug 13, 2020
The problem on Windows is the selected font – it doesn't have support to arabic. User should choose one that does.
About the text direction:
morevnaproject commentedon Aug 14, 2020
You right! I changed font and it works now!

morevnaproject commentedon Aug 14, 2020
That was my first idea too. But we will have problems with mixed strings, like this:

And yes, we have to deal with ligatures/liaison.
I think that would be the best case.
@blackwarthog also used Pango for his prototype of Text Layer - https://repo.coolbug.org/morevna/lab/blob/master/f/c++/freetype
Unfortunately, I have lost contact with @blackwarthog and I think he will not continue working on Text Layer. At the same time there are no license in his code repo, so I think we do not have permission to use that code directly.
rodolforg commentedon Aug 14, 2020
Pango doesn't let us to deform character as current implementation does... AFAIK it only allows us to set font height
morevnaproject commentedon Aug 14, 2020
Looks like it allows to deform. In Synfig 1.0.2 there was cairo-based render engine, which was using Pango.
I have tested and it renders Arabic text correctly (with deformation) -
This code remaining here -
synfig/synfig-core/src/modules/lyr_freetype/lyr_freetype.cpp
Lines 1171 to 1355 in 09d6069
rodolforg commentedon Aug 14, 2020
Ok. I saw a "transformation matrix" in Pango that should the work.
khaledhosny commentedon Aug 14, 2020
Pango should be much less work to integrate (especially if you already use Cairo), and provides many needed features (RTL, font fallabck, line breaking, etc). HarfBuzz is much lower level than Pango, and will require a bit of work (and additional libraries) to get the same features.
rodolforg commentedon Aug 14, 2020
I've found a reference implementation for raw harfbuzz:
https://github.com/lxnt/ex-sdl-freetype-harfbuzz/blob/master/ex-sdl-freetype-harfbuzz.c
We don't use cairo in rendering (anymore).
Anyway, I tested a simple/draft implementation by using pango yesterday.
I did wish to avoid it, to reduce the synfig library dependencies (keep them at low number).
However, I don't have time now to think on how to deal BiDi texts. And cairo/pango are somehow still as a dependency for the core library.
morevnaproject commentedon Aug 16, 2020
UPDATE: The client company has flushed away. ^__^ I have implemented a sound export feature for them, but they didn't paid according to our previous agreement. Well, we have a great feature anyway! 🤣
rodolforg commentedon Aug 16, 2020
Oh. So I'll go back to my priority list lol Cleanup header files and standardize custom widgets
morevnaproject commentedon Aug 16, 2020
Woah!!!
7 remaining items
rodolforg commentedon Aug 28, 2020
Here: https://github.com/rodolforg/synfig/tree/text-pango
morevnaproject commentedon Aug 31, 2020
Thank you! I have tested it and build process fails for me when it tries to render splash screen:
Though, if I skip building of images it works and I was able to see correct Arabic text on workspace!
rodolforg commentedon Aug 31, 2020
And now I'm having this problem even in master branch, even after deleting _debug folder… :(
ice0 commentedon Aug 31, 2020
@rodolforg Looks like it can't find
config.hAs for me, the best way to fix this is to run the script
2-build - *. shand wait for it to complete.rodolforg commentedon Aug 31, 2020
I tried it too :( production version works. Debug version after cloning repo to another path too.
I figured it out: The problem was that try I did by following the CMake instructions. It polluted my source folder (with CMakeFiles dirs, Makefile, .cmake and .cmake.in files) instead of using the suggested
cmake-builddir.Besides, it created a
etl_profile.hin(source-dir)/ETL/ETL/that is completely different of that generated by Autotools (and it misses the ETL_version definition).morevnaproject commentedon Aug 31, 2020
I have made attempt to build binary on Windows (to send an early preview to the client), but it fails with the following error:
@ice0 any ideas why this can happen?
morevnaproject commentedon Aug 31, 2020
P.S. I am building the code from branch "testing" - https://github.com/synfig/synfig/tree/testing
ice0 commentedon Aug 31, 2020
@morevnaproject looks like pango not linked. I will take a look,
ice0 commentedon Aug 31, 2020
pangoft2
morevnaproject commentedon Sep 1, 2020
@ice0 Oooh, thank you so much!!
Fahad-Alsaidi commentedon Dec 30, 2020
Is there any update on this?
rodolforg commentedon Dec 30, 2020
I'm sorry I stopped to work on this due to my difficult to make the pango implementation compatible to current implementation (coordinates, size, and features).
I may (try to) work more on it later, but not now.
rodolforg commentedon Oct 16, 2021
@morevnaproject we can close this issue?
morevnaproject commentedon Oct 17, 2021
Yes! Thank you!