Scaling width of charecters in unicode (Malayalam, India)

Previous topic - Next topic

mujeebcpy

we are implementing scribus for a news paper organization in Kerala, India. after 1.5 version Unicode Malayalam is rendering correctly. hyphenation is also working well. after lot of trail lay-outing we facing a problem in scaling width of characters. when Unicode fonts scaled all proportion of the fonts get distorted.  i tried the same font in indesign which works very well. text condensation is a much needed feature for a news paper. it will be very helpful if that issue fixed. im including sample unicode malayalam word with this. try scaling width.

ജോലിയുള്ളവരുടെ കോഴികള്‍

we are using scribus 1.5.5 latest build until today

[attachment deleted by admin]

a.l.e

hi mujeebcpy,

nice to see newspapers considering scribus!
and even nicer knowing that anil from atps.in had a try several years ago to produce a version of scribus that would support malayalam but "failed" to make the solution solid enough for being included in the mainstream scribus!

i tested your text into a document with Noto Sans Malayalam and i can indeed see the issue.

can you please open a ticket in the bug tracker https://bugs.scribus.net ?

ciao
a.l.e

mujeebcpy

Thank for the quick response. i know Mr.Anil. and i will open the bug ASAP. i am including a part of our layout work here (it is just sample contents. so im not including the head portion)
one more thing, the dropcap feature need 3 characters for some letters in Malayalam.


[attachment deleted by admin]

ranjithsiji

#3
Quote from: a.l.e on July 10, 2019, 03:28:56 PM
hi mujeebcpy,

nice to see newspapers considering scribus!
and even nicer knowing that anil from atps.in had a try several years ago to produce a version of scribus that would support malayalam but "failed" to make the solution solid enough for being included in the mainstream scribus!

i tested your text into a document with Noto Sans Malayalam and i can indeed see the issue.

can you please open a ticket in the bug tracker https://bugs.scribus.net ?

ciao
a.l.e

Myself Ranjithsiji, Working with Mujeeb. We are trying to implement Scribus (Infact the whole Free Software Stack Scribus, Inkscape, Gimp, Krita) into various Newspapers and magazines in Kerala. We have a small dev team with some experience in Qt programming. If you can help us to fix this bug or help us in a direction like what to do to fix this bug will be verymuch helpfull for us. Expecting help.

A Bug is created at https://bugs.scribus.net/view.php?id=15736
Implementing Scribus in Newspaper Workflow.

a.l.e

nice to meet you, ranjitshiji!

for this specific issue, we well probably need to wait for jean to come back from a few days holidays.

i'm not a font specialist, but i guess that in this case you will have to focus on the font shaping and -- probably -- harfbuzz.

it might something simple, that jean can fix very fast... but if it's something that needs more work, i would be glad to help you guys better understand this part of the scribus code that is so important for you!

i have also added another screenshot to the ticket, one that better shows the issue for people like me who have no clue about your language : - )
(i was curious about the meaning of the sentence and i was a bit surprised about what google translate told me...)

mujeebcpy

//(i was curious about the meaning of the sentence and i was a bit surprised about what google translate told me...)//
haha. i needed the ജോ and കോ letters to show the extreme problem with scaling. so i just choose two words ;) thats all
by the way the bug i reported is not loading now

a.l.e

hi ranjithsiji,

i had a chat with andreas about this bug.

he asked me about the pdf output and i tried it out: when you increase the character width, the second character wanders to the right, in the pdf it's displaced to the left.

according to andreas, the relevant variable is "xadvance"...
i wonder if looking at differences in how pdflib_core.cpp and text/screenpainter.cpp manage it, might help fixing the bug...

he also supposes that the reordering of the characters might be "confusing" scribus...

grepping for xadvance in the source code gives only a few occurrences and might help studying how this work.

i'll keep you informed : - )

ciao
a.l.e

a.l.e

Further feedback: "it's not the reordering, it's the clusters. Scribus doesnt scale multi-glyph clusters correctly"

ranjithsiji

Quote from: a.l.e on July 10, 2019, 11:04:26 PM
Further feedback: "it's not the reordering, it's the clusters. Scribus doesnt scale multi-glyph clusters correctly"

Yes. It is the problem of scaling the multi-glyph character. ജോ is a combination of ജ + ോ. When we scale the sentence the calculation of spacing creates the problem.

I tried this thing in Libreoffice and it is working perfect there. Is scribus using same library to display text? Can we get any help from their code?
Implementing Scribus in Newspaper Workflow.

a.l.e

hi mujeebcpy,

if you look at the patch andreas has put in the bug tracker you will notice that scribus uses cairo for the display on screen and its own library for creating the pdf.

the patch is "very simple" and studying it will help you understand a bit how scribus works in a part of the code that is very important for indic and arabic languages : - )

currently, i have to first get my own copy of the scribus code to compile again, then i can test if the changes proposed by andreas work for me!

i'll get back to you very soon
a.l.e

ranjithsiji

#10
hi ale,

I tested the patch that andreas given with latest scribus code and it is working perfectly. I amazed about the solution. This was real life saver for us. Thank you for your quick response and patch. I think this will fix the problem for all indic langauges. Because Malayalam is the most complex indic language with lot of complex rules. So it may work for all.

Thanks for this amazing fix

Best,
Ranjithisiji
Implementing Scribus in Newspaper Workflow.

Nermander

I think this really shows the power of Open Source development.

RodneyLee

if its just "Headlines" why not do a .svg in inkscape, scaling would be perfect

mujeebcpy

Quote from: a.l.e on July 11, 2019, 07:53:48 AM
hi mujeebcpy,

if you look at the patch andreas has put in the bug tracker you will notice that scribus uses cairo for the display on screen and its own library for creating the pdf.

the patch is "very simple" and studying it will help you understand a bit how scribus works in a part of the code that is very important for indic and arabic languages : - )

currently, i have to first get my own copy of the scribus code to compile again, then i can test if the changes proposed by andreas work for me!

i'll get back to you very soon
a.l.e

yes. i build and run it successfully. truly speaking i didn't expected this much fast response and fix. i totally wondered. and ofcourse  i will try to understand the code. expecting guidance from all of you

mujeebcpy

Quote from: RodneyLee on July 11, 2019, 06:40:10 PM
if its just "Headlines" why not do a .svg in inkscape, scaling would be perfect

we suggested that. and the layout workers are little bit worried about the total shift from pagemaker. this migration plan is going on about 6 months. main problem was condensation. in news paper lay-outing last column shoud be aligned. to make this some condensation is needed in last paragraph of body text too.