Author Topic: Scaling width of charecters in unicode (Malayalam, India)  (Read 1403 times)

mujeebcpy

  • Newbie
  • *
  • Posts: 16
  • Karma: 0
  • Scribus User
Scaling width of charecters in unicode (Malayalam, India)
« on: July 10, 2019, 02:18:34 pm »
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
« Last Edit: July 10, 2019, 02:20:47 pm by mujeebcpy »

a.l.e

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2167
  • Karma: 28
    • the graphics lab
Re: Scaling width of charecters in unicode (Malayalam, India)
« Reply #1 on: July 10, 2019, 04: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

mujeebcpy

  • Newbie
  • *
  • Posts: 16
  • Karma: 0
  • Scribus User
Re: Scaling width of charecters in unicode (Malayalam, India)
« Reply #2 on: July 10, 2019, 04:51:10 pm »
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.
« Last Edit: July 10, 2019, 04:53:54 pm by mujeebcpy »

ranjithsiji

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
  • Scribus User - Implementing in Newspapers, India
    • Smashing Web
Re: Scaling width of charecters in unicode (Malayalam, India)
« Reply #3 on: July 10, 2019, 05:19:36 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
« Last Edit: July 10, 2019, 05:47:49 pm by ranjithsiji »
Making Scribus Works for Newspapers

a.l.e

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2167
  • Karma: 28
    • the graphics lab
Re: Scaling width of charecters in unicode (Malayalam, India)
« Reply #4 on: July 10, 2019, 07:15:51 pm »
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

  • Newbie
  • *
  • Posts: 16
  • Karma: 0
  • Scribus User
Re: Scaling width of charecters in unicode (Malayalam, India)
« Reply #5 on: July 10, 2019, 09:25:51 pm »
//(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

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2167
  • Karma: 28
    • the graphics lab
Re: Scaling width of charecters in unicode (Malayalam, India)
« Reply #6 on: July 10, 2019, 11:26:55 pm »
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

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2167
  • Karma: 28
    • the graphics lab
Re: Scaling width of charecters in unicode (Malayalam, India)
« Reply #7 on: July 11, 2019, 12:04:26 am »
Further feedback: "it's not the reordering, it's the clusters. Scribus doesnt scale multi-glyph clusters correctly"

ranjithsiji

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
  • Scribus User - Implementing in Newspapers, India
    • Smashing Web
Re: Scaling width of charecters in unicode (Malayalam, India)
« Reply #8 on: July 11, 2019, 04:39:50 am »
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?
Making Scribus Works for Newspapers

a.l.e

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2167
  • Karma: 28
    • the graphics lab
Re: Scaling width of charecters in unicode (Malayalam, India)
« Reply #9 on: July 11, 2019, 08: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

ranjithsiji

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
  • Scribus User - Implementing in Newspapers, India
    • Smashing Web
Re: Scaling width of charecters in unicode (Malayalam, India)
« Reply #10 on: July 11, 2019, 09:41:43 am »
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
« Last Edit: July 11, 2019, 09:43:57 am by ranjithsiji »
Making Scribus Works for Newspapers

Nermander

  • Hero Member
  • *****
  • Posts: 1314
  • Karma: 17
Re: Scaling width of charecters in unicode (Malayalam, India)
« Reply #11 on: July 11, 2019, 05:44:04 pm »
I think this really shows the power of Open Source development.

RodneyLee

  • Full Member
  • ***
  • Posts: 146
  • Karma: 2
  • Scribus User
Re: Scaling width of charecters in unicode (Malayalam, India)
« Reply #12 on: July 11, 2019, 07:40:10 pm »
if its just "Headlines" why not do a .svg in inkscape, scaling would be perfect

mujeebcpy

  • Newbie
  • *
  • Posts: 16
  • Karma: 0
  • Scribus User
Re: Scaling width of charecters in unicode (Malayalam, India)
« Reply #13 on: July 11, 2019, 08:31:02 pm »
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

  • Newbie
  • *
  • Posts: 16
  • Karma: 0
  • Scribus User
Re: Scaling width of charecters in unicode (Malayalam, India)
« Reply #14 on: July 11, 2019, 08:38:29 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.

 

palmate