Page MenuHomePhabricator

Add Malayalam fonts into Wikisource Export tool to get proper Language rendering in exported files
Open, Needs TriagePublicFeature

Description

Feature summary (what you would like to be able to do and where):
No Malayalam font is available in the Wikisource Book Export Tool. By using a default font the Rendering of Malayalam letters in the export is coming wrong. So I am requesting to add Malayalam fonts to the tool. The fonts are available in https://smc.org.in/ml/fonts/ and https://fonts.google.com/?query=malayalam . I prefer Gayathri, Malini and Manjari to be included. Because a lot of Old original lipi rendering is needed in Malayalam texts.

Use case(s) (list the steps that you performed to discover that problem, and describe the actual underlying problem which you want to solve. Do not describe only a solution):
To get the problem just visit This export link and download pdf and check the Malayalam rendering.

Benefits (why should this be implemented?):
It is very essential to preseve old Malayalam Lipi rendering. Because a lot of old Lipi is appearing in old Malayalam Books

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Aklapper renamed this task from Add Malayalam fonts into Wikisource Export tool to get proper Langauge rendering in exported files. to Add Malayalam fonts into Wikisource Export tool to get proper Language rendering in exported files.Sep 10 2024, 2:59 PM

Noto Sans Malayalam is already installed: https://ws-export.wmcloud.org/?fonts=Noto%20Sans%20Malayalam

Are the fonts from https://smc.org.in/ml/fonts/ better? We could look at installing them as well, although only if needed.

Would this package be suitable? https://packages.debian.org/bookworm/fonts-smc-raghumalayalamsans It's better to use fonts from packages rather than installing them manually (less work on upgrades etc.).

Done.

Note also that you can set the default font by editing MediaWiki:WS_Export.json, e.g.:

{
    "defaultFont": "Noto Sans Malayalam"
}

I did the respective changes. and tested.

Worked. Thanks for the supports.

Noto Sans Malayalam is not enough for Wikisource Malayalam. Because it cannot render old lipi complex scripts. We need https://packages.debian.org/bookworm/fonts-smc-manjari and
https://packages.debian.org/bookworm/fonts-smc-gayathri for old script users. So we need at least 3 fonts. https://packages.debian.org/bookworm/fonts-smc-raghumalayalamsans is not sutable because it is not updated for a long time. The default export to pdf is not working for me. But I can select the font from the dropdown of the tool and it is working fine.

@Ranjithsiji Those are all installed now. Is everything sufficient? Or are there still other fonts that you'd like?

No need to add another font. I got the fonts. Everything is fine. Only thing is the font is not picking up on direct download link. Trying again now and is not working. I tried https://ml.wikisource.org/wiki/Abhivadyam this link. And when press download button and select pdf then it is rendering in bad shape.

When I pass https://ws-export.wmcloud.org/?format=pdf&lang=ml&page=%E0%B4%85%E0%B4%AD%E0%B4%BF%E0%B4%B5%E0%B4%BE%E0%B4%A6%E0%B5%8D%E0%B4%AF%E0%B4%82&fonts=manjari Then it is working.

&fonts=manjari

is needed in the default download button.

Oh, good point, sorry! The config is cached for one month. I've cleared the cache, can you check again?

Yes. It is working now. Thanks for the quick action. Also another question. How can I control the size of the font, line height of the sentance. Also margin. Also How can I change the frontpage image? Is there any configuration to do this thing?

One more help related to this. i completed L10N of the tool in Translate Wiki.

I wish to do translate the default English text in the template.

Screenshot 2024-09-13 at 01-18-25 അഭിവാദ്യം - അഭിവാദ്യം.pdf.png (622×930 px, 149 KB)

Is i need to open a new issue for following the L10N related things ?

One more help related to this. i completed L10N of the tool in Translate Wiki.

Great!

I wish to do translate the default English text in the template.

For the about page, you need to create a localized version at https://ml.wikisource.org/wiki/MediaWiki:Wsexport_about

You can base it on the one on Multilingual Wikisource: https://wikisource.org/wiki/MediaWiki:Wsexport_about