[System Fonts] Replace default sinhala font from LKLUG to Noto

Bug #2000551 reported by නොදන්නා
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
language-selector (Ubuntu)
Fix Released
Wishlist
Gunnar Hjalmarsson
Jammy
Fix Released
Wishlist
Gunnar Hjalmarsson
Kinetic
Fix Released
Wishlist
Gunnar Hjalmarsson
ubuntu-meta (Ubuntu)
Won't Fix
Undecided
Unassigned

Bug Description

[ Impact ]

The current default font for Sinhala (LKLUG) is unmaintained and comes with issues. Noto offers Sinhala fonts with significantly higher quality.

fonts-lklug-sinhala is pulled by quite a few meta packages. Instead of changing that, the proposed change makes fontconfig give Noto Sans Sinhala respective Noto Serif Sinhala higher precedence than LKLUG, and that — together with installation of fonts-noto-core — seems to be sufficient to achieve the desired result.

[ Test Plan ]

* Install language-selector-[common,gnome] from [jammy,kinetic]-proposed.

* Open Language Support and install the Sinhala language.

* Open a terminal window and run this command:

  fc-match -a | grep -E 'LKLUG|Sinhala'

* Confirm that Noto Sans Sinhala is listed before LKLUG.

* Close Firefox and re-open it.

* Visit e.g. https://si.wikipedia.org and confirm the
  improvement. (Also I (Gunnar), who don't speak Sinhala,
  notice a remarkable difference.)

[ Where problems could occur ]

No real problem in sight. Some Sinhala speaking users with fonts-noto-core installed will indeed see a surprise change when it starts to render Sinhala via Noto fonts instead of LKLUG. But that surprise ought to make them happy. :)

Please note Robie Basak's warning about the changed font metrics in comment #7, though.

[ Original description ]

**What's the problem?**

Currently ubuntu comes with LKLUG font for sinhala (si). it's not clear. e.g. we cannot recognize vowel signs and read websites using that font. We can change it manually but such changes do not apply to some applications or application types e.g. snap apps etc.

LKLUG (last active: 2012) no one maintain it now.
https://web.archive.org/web/20220000000000*/http://www.lug.lk/
http://www.lug.lk/fonts/lklug

**What expected to happen?**

We would like to see Noto serif sinhala as the default font for sinhala language
https://fonts.google.com/noto/specimen/Noto+Serif+Sinhala
[Highlighs: clear (readable), thin, takes less space than sans sinhala]

If noto sans is more suitable for ubuntuOS, you can add noto sans sinhala https://fonts.google.com/noto/specimen/Noto+Sans+Sinhala
[Highlighs: clear (readable), thick, takes more space than serif sinhala]

**Additional details**

Screenshots (see the difference: LKLUG/Noto)

LKLUG
https://i.ibb.co/nbHM5Mw/lklug.jpg

Noto Sinhala
https://i.ibb.co/k9dbtYb/noto.jpg

If you need more examples or clarifications, please add a comment

Random posts
1. https://groups.google.com/g/Sinhala-Unicode/c/LYxuJ44dY3g
2. https://twitter.com/thilinag/status/1598707165920825344#m (LKLUG bug with some apps)
3. https://www.reddit.com/r/srilanka/comments/nzpl9p/change_sinhala_font_in_ubuntu/

Also, some developers already have designed tools, scripts for that problem however many people do not try to find these scripts and switch to other OS
1. https://github.com/IMS94/UbuntuSinhalaFont (developer: PMC chair @apache)
2. https://gist.github.com/thilinag/66577033fafd00c3dfdaa898c2478c79
3. https://github.com/hankyoTutorials/linux-system-sinhala-font-changer

Please review details, screenshots and posts. This is not a personal opinion and atleast, i expect to see this change in the next interim or LTS release.

Furthermore, please let me know if i can help to speed-up this replacement process

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ubuntu-meta (Ubuntu):
status: New → Confirmed
Revision history for this message
HelaBasa Group (shared) (nawala) wrote :
Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

Hi Aurora, and thanks for your report.

I see that LKLUG is pulled by default by several meta packages, and I'd prefer to avoid stopping them from doing that.

$ apt rdepends fonts-lklug-sinhala
fonts-lklug-sinhala
Reverse Depends:
  Recommends: ubuntu-desktop
  Recommends: xubuntu-desktop
  Recommends: xubuntu-core
  Recommends: vanilla-gnome-desktop
  Recommends: ubuntustudio-desktop
  Recommends: ubuntukylin-desktop
  Recommends: ubuntucinnamon-desktop
  Recommends: ubuntu-unity-desktop
  Recommends: ubuntu-mate-desktop
  Recommends: ubuntu-mate-core
  Recommends: ubuntu-budgie-desktop
  Recommends: lubuntu-desktop
  Recommends: kubuntu-desktop
  Recommends: ubuntu-desktop-minimal

Instead we can use fontconfig to achive the desired result. I have played with the language-selector package and made a test version available here:

https://launchpad.net/~gunnarhj/+archive/ubuntu/language-selector

The change is not huge. You can see what I did in the repo:

https://git.launchpad.net/~ubuntu-desktop/ubuntu/+source/language-selector/commit/?id=36d055d1

The point with the change is to make fontconfig give Noto Sans Sinhala respective Noto Serif Sinhala higher precedence than LKLUG.

The fonts-noto-core package needs to be installed, of course, which it currently is not for all users. So for a Sinhala speaking user, who wants to use Noto fonts for rendering Sinhala, they can do either of these steps:

* Select the Sinhala language when installing Ubuntu. That way fonts-noto-core will be installed at first login.

* Open Language Support and add the Sinhala language from there, which will pull fonts-noto-core.

As regards snaps, this approach makes a difference with the Firefox snap at least.

Can you please install language-selector-gnome and language-selector-common from the PPA I mentioned, and let us know what you think.

Revision history for this message
නොදන්නා (aunknown) wrote :

>Can you please install language-selector-gnome and language-selector-common from the PPA I mentioned, and let us know what you think.

I tested it on new ubuntu 22.10 VM and thank you.

>I see that LKLUG is pulled by default by several meta packages, and I'd prefer to avoid stopping them from doing that.

$ apt rdepends fonts-lklug-sinhala~fonts-lklug-sinhala~Reverse Depends:
ubuntu-desktop, xubuntu-desktop, xubuntu-core, vanilla-gnome-desktop, ubuntustudio-desktop, ubuntukylin-desktop, ubuntucinnamon-desktop, ubuntu-unity-desktop, ubuntu-mate-desktop, ubuntu-mate-core, ubuntu-budgie-desktop, lubuntu-desktop, kubuntu-desktop, ubuntu-desktop-minimal

Ah! i (or we: sri lankan ubuntu users) need this replacement for all other editions / desktops.

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

> Ah! i (or we: sri lankan ubuntu users) need this replacement for all
> other editions / desktops.

I will make the change for Ubuntu 22.04 — our latest LTS — besides the current development version. As regards other desktops, all the official Ubuntu flavors will be affected by this change in language-selector-common.

description: updated
no longer affects: ubuntu-meta (Ubuntu Jammy)
Changed in ubuntu-meta (Ubuntu):
status: Confirmed → Won't Fix
Changed in language-selector (Ubuntu):
assignee: nobody → Gunnar Hjalmarsson (gunnarhj)
importance: Undecided → Wishlist
status: New → Fix Committed
Changed in language-selector (Ubuntu Jammy):
assignee: nobody → Gunnar Hjalmarsson (gunnarhj)
importance: Undecided → Wishlist
status: New → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package language-selector - 0.220

---------------
language-selector (0.220) lunar; urgency=medium

  * data/pkg_depends, fontconfig/64-language-selector-prefer.conf:
    - Make Noto Sans Sinhala and Noto Serif Sinhala default fonts for
      rendering Sinhala (LP: #2000551).
  * Bump year in d/copyright
  * Bump Standards-Version to 4.6.2

 -- Gunnar Hjalmarsson <email address hidden> Wed, 28 Dec 2022 20:27:29 +0100

Changed in language-selector (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Robie Basak (racb) wrote :

Thank you for working on this!

What's the plan for Kinetic? Please see: https://wiki.ubuntu.com/StableReleaseUpdates#Newer_Releases

If the goal is to make Sinhala text more readable on Ubuntu, please could you make that an additional part of the Test Plan, instead of only checking the order of output in a font listing? I appreciate that would be subjective, but I think that with the screenshots given, asking someone who can read Sinhala to just verify it's a substantial improvement and matches expectations would be much better than not doing that at all. In working to fix this we should ensure that we've actually achieved the intended goal, rather than an intermediary technical step.

> Where problems could occur

It sounds like font metrics are changing, so text might wrap differently, resulting in it no longer fitting, or change the size of windows, etc, in various user interface elements. It sounds like it's worth the change, but please look out for this during testing.

Changed in language-selector (Ubuntu Jammy):
status: In Progress → Incomplete
Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

On 2023-01-04 18:46, Robie Basak wrote:
> What's the plan for Kinetic? Please see:
> https://wiki.ubuntu.com/StableReleaseUpdates#Newer_Releases

The plan is to be lazy and skip kinetic. ;)

Actually, in this particular case it shouldn't be a problem. If a user with an updated jammy (including this fix) upgrades to kinetic, they will still have version 0.219.1 of the language-selector-* packages, since the version string in kinetic is lower. So no regression.

I added a kinetic "Won't fix" bug task to clarify my intention.

> If the goal is to make Sinhala text more readable on Ubuntu, please
> could you make that an additional part of the Test Plan, instead of
> only checking the order of output in a font listing?

I expanded the test plan with that.

>> Where problems could occur
>
> It sounds like font metrics are changing, so text might wrap
> differently, resulting in it no longer fitting, or change the size
> of windows, etc, in various user interface elements. It sounds like
> it's worth the change, but please look out for this during testing.

Please note that Sinhala is not well covered with respect to FOSS (including Ubuntu) translations. If you use Sinhala as the display language for menus and messages, you see Sinhala strings only occasionally. So even if the risk you mention exists, it's a low risk for this reason.

I'm assuming that the focus of the Sinhala speaking users is about web browsing at first hand.

But I added a pointer to this aspect in the bug description.

description: updated
Changed in language-selector (Ubuntu Kinetic):
status: New → Won't Fix
Changed in language-selector (Ubuntu Jammy):
status: Incomplete → In Progress
no longer affects: ubuntu-meta (Ubuntu Kinetic)
Revision history for this message
Robie Basak (racb) wrote :

Thank you for the updates! It looks like you responded appropriately to all of my points, but I'd like to clarify one thing about version numbers and Kinetic.

> If a user with an updated jammy (including this fix) upgrades to kinetic, they will still have version 0.219.1 of the language-selector-* packages, since the version string in kinetic is lower. So no regression.

If you're not intending to fix Kinetic, then we'll need to use a different package version for Jammy. We generally avoid the version situation you describe, since that makes it difficult to reliably issue an update for users for the package in Kinetic. Consider if a security update were then required, for example. It would be possible to fix, but only if someone were to notice the unusual situation first. And it's confusing for Kinetic users to be on a different package version depending on whether or not they upgraded from Jammy or not. That situation means there are more combinations of interactions with other packages that might lead to different behaviours and different bugs. So we avoid it.

Using a "compliant" version for the Jammy SRU, the original point about regressions on upgrade still stands, but see https://wiki.ubuntu.com/StableReleaseUpdates#Newer_Releases for instructions and policy for this situation. It may still acceptable if you insist on not updating Kinetic. But we will want to adjust the version string for Jammy.

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

Ok, Robie, you win. :) I have uploaded to the kinetic unapproved queue too. Hopefully the version string (0.219.22.10.1) makes sense.

Changed in language-selector (Ubuntu Kinetic):
assignee: nobody → Gunnar Hjalmarsson (gunnarhj)
importance: Undecided → Wishlist
status: Won't Fix → In Progress
description: updated
Revision history for this message
Robie Basak (racb) wrote : Please test proposed package

Hello Aurora, or anyone else affected,

Accepted language-selector into kinetic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/language-selector/0.219.22.10.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-kinetic to verification-done-kinetic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-kinetic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in language-selector (Ubuntu Kinetic):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-kinetic
Changed in language-selector (Ubuntu Jammy):
status: In Progress → Fix Committed
tags: added: verification-needed-jammy
Revision history for this message
Robie Basak (racb) wrote :

Hello Aurora, or anyone else affected,

Accepted language-selector into jammy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/language-selector/0.219.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-jammy to verification-done-jammy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-jammy. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

I have accomplished the steps in the test plan:

* for jammy with language-selector-[common,gnome] 0.219.1

* for kinetic with language-selector-[common,gnome] 0.219.22.10.1

and can verify the expected improvement. (The kinetic verification was made on Xubuntu 22.10 where fonts-noto-core is installed by default for all users. The configuration tweak has the same effect on Xubuntu as on Ubuntu, though.)

tags: added: verification-done verification-done-jammy verification-done-kinetic
removed: verification-needed verification-needed-jammy verification-needed-kinetic
Revision history for this message
නොදන්නා (aunknown) wrote :

thank you @gunnarhj and all 🎉

Revision history for this message
නොදන්නා (aunknown) wrote (last edit ):

Hi @gunnarhj

>I have played with the language-selector package and made a test version available here:
Can you please install language-selector-gnome and language-selector-common from the PPA I mentioned,
https://launchpad.net/~gunnarhj/+archive/ubuntu/language-selector

I said that it helped to change the font properly (kinetic:22.10 device) ^_^

but some users who received the 0.219.1 update (jammy-proposed) to 22.04 said nothing changed on their devices. what's the reason? they've also restarted their devices

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

@Aurora: fonts-noto-core needs to be installed also. Please see the test plan.

They should open Language Support. If a user already has the Sinhala language installed, they will be prompted to install fonts-noto-core. Otherwise they should install Sinhala, in which case fonts-noto-core will be one of the installed packages.

Or they can simply do: sudo apt install fonts-noto-core

Once ISOs with the 22.04.2 point release is out, a new install of Ubuntu, where the user picks Sinhala as the language in the installer, will use the Noto fonts out of the box.

Revision history for this message
නොදන්නා (aunknown) wrote :

Ah! got it.
thank you ^_^

Revision history for this message
නොදන්නා (aunknown) wrote (last edit ):

Hi,

>Or they can simply do: sudo apt install fonts-noto-core

but flatpak users said that flatpak apps still use LKLUG, how to solve that problem?

[different use case]
Also, the main problem is more complex than i thought.

>The point with the change is to make fontconfig give Noto Sans Sinhala respective Noto Serif Sinhala ?higher precedence than LKLUG. The fonts-noto-core package needs to be installed, of course, which it currently is not for all users. So for a Sinhala speaking user, who wants to use Noto fonts for rendering Sinhala, they can do either of these steps:
>
>* Select the Sinhala language when installing Ubuntu. That way fonts-noto-core will be installed at first login.
>* Open Language Support and add the Sinhala language from there, which will pull fonts-noto-core.

According to the details, if a sinhala language speaker or foreigner keeps only english (default) or other language in the system and when they view a sinhala web page using a web browser or use a text editor to edit something, it looks like ubuntu still uses LKLUG as the default font. please correct me if i am wrong. should i propose a small font package like LKLUG?

we have thousands of sinhala fonts but no one maintains them like noto team maintains their fonts :D
https://sinhala-fonts.org/fonts https://sinhalafont.net/

As far as I know, proprietary operating systems come with high quality and well-maintained fonts for all languages.

Edit: Also, they release versions separately for each script https://github.com/notofonts/sinhala/releases
but i couldn't find a suitable .deb package except noto core

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

On 2023-01-17 08:48, Aurora wrote:
>> Or they can simply do: sudo apt install fonts-noto-core
>
> but flatpak users said that flatpak apps still use LKLUG, how to
> solve that problem?

I don't know anything about Flatpak, sorry. Can't tell to which extent Flatpak honors fontconfig. Maybe try Ask Ubuntu or some Flatpak oriented support resource.

I know that the Firefox snap provided in Ubuntu honors the configuration in /etc/fonts/conf.d, and so do conventionally installed applications too.

> if a sinhala language speaker or foreigner keeps only english
> (default) or other language in the system and when they view a
> sinhala web page using a web browser or use a text editor to edit
> something, it looks like ubuntu still uses LKLUG as the default
> font.

That's not what I see. I just made an English install of the coming Ubuntu 23.04 in VirtualBox and updated the packages. Then I

* Opened a terminal and run: sudo apt install fonts-noto-core

* Opened Firefox, went to https://si.wikipedia.org, and found that the
  page was rendered using Noto Sans Sinhala and Noto Serif Sinhala — not
  LKLUG.

> should i propose a small font package like LKLUG?

What would the point be with doing so?

Revision history for this message
නොදන්නා (aunknown) wrote :

>I don't know anything about Flatpak, sorry. Can't tell to which extent Flatpak honors fontconfig. Maybe try Ask Ubuntu or some Flatpak oriented support resource.

I'll check it^^

>That's not what I see. I just made an English install of the coming Ubuntu 23.04
>What would the point be with doing so?

Edit: i'll check it soon with 23.04

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package language-selector - 0.219.22.10.1

---------------
language-selector (0.219.22.10.1) kinetic; urgency=medium

  * data/pkg_depends, fontconfig/64-language-selector-prefer.conf:
    - Make Noto Sans Sinhala and Noto Serif Sinhala default fonts for
      rendering Sinhala (LP: #2000551).

 -- Gunnar Hjalmarsson <email address hidden> Thu, 05 Jan 2023 14:01:47 +0100

Changed in language-selector (Ubuntu Kinetic):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for language-selector has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package language-selector - 0.219.1

---------------
language-selector (0.219.1) jammy; urgency=medium

  * data/pkg_depends, fontconfig/64-language-selector-prefer.conf:
    - Make Noto Sans Sinhala and Noto Serif Sinhala default fonts for
      rendering Sinhala (LP: #2000551).

 -- Gunnar Hjalmarsson <email address hidden> Wed, 28 Dec 2022 20:41:53 +0100

Changed in language-selector (Ubuntu Jammy):
status: Fix Committed → Fix Released
Revision history for this message
නොදන්නා (aunknown) wrote :

@gunnarhj

>That's not what I see. I just made an English install of the coming Ubuntu 23.04 in VirtualBox and updated the packages.

I was busy. i installed and tested it today however noto sinhala font doesn't come with CD image. that's the problem. 23.04 https://cdimage.ubuntu.com/daily-live/20230216/

>* Opened a terminal and run: sudo apt install fonts-noto-core

Every user must be aware to follow this step otherwise it still uses LKLUG. Also, this can be problematic for office/limited environments. so this is not the expected solution :(

>> should i propose a small font package like LKLUG?
What would the point be with doing so?

Above

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

> so this is not the expected solution :(

It's the solution we are able to offer ATM.

Please understand:

* It's not an option in the short run to install fonts-noto-core for all Ubuntu users. At the moment that package gets installed as a language support component for certain languages, including Sinhala due to the fix of this bug. We deal with e.g. Arabic in a similar way.

* As a consequence of that, the user needs to tell the system somehow that they want the relevant Sinhala language support. They can do so by:

- selecting Sinhala lanaguage in the installer,
- Go to Settings -> Region & Language -> Manage Installed Languages
  and install the Sinhala language from there, or
- simply install fonts-noto-core manually.

* It's unlikely that a package which installs only the Sinhala Noto *.ttf files would be approved in Debian/Ubuntu, since those files are already provided by fonts-noto-core.

It's worth mentioning that everybody is not happy with the packaging of Noto fonts:

https://bugs.debian.org/983291

There is indeed work to be done in order to improve the selection of fonts provided for Ubuntu by default, and the way the Noto fonts are packaged makes that harder. In the future we will hopefully be able to improve all this, but in the short run this is as long as we will get as regards e.g. Sinhala.

HTH

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.