A new request with request id 8721 has been created by koha-devel-request@lists.koha-community.org. Short info on the request is :
Title : Koha-devel Digest, Vol 199, Issue 26
Category :
Description : Send Koha-devel mailing list submissions to
koha-devel@lists.koha-community.org
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
or, via email, send a message with subject or body 'help' to
koha-devel-request@lists.koha-community.org
You can reach the person managing the list at
koha-devel-owner@lists.koha-community.org
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Koha-devel digest..."
Today's Topics:
1. Multilingual label printing in Koha (praise be to Bywater!)
(dcook@prosentient.com.au)
2. Re: Multilingual label printing in Koha (praise be to
Bywater!) (Indranil Das Gupta)
----------------------------------------------------------------------
Message: 1
Date: Thu, 30 Jun 2022 17:04:20 +1000
From: <dcook@prosentient.com.au>
To: "'Koha-devel'" <koha-devel@lists.koha-community.org>
Cc: "'Kyle Hall'" <kyle@bywatersolutions.com>, "'Brendan Gallagher'"
<brendan@bywatersolutions.com>
Subject: [Koha-devel] Multilingual label printing in Koha (praise be
to Bywater!)
Message-ID: <08f401d88c4f$a36e00b0$ea4a0210$@prosentient.com.au>
Content-Type: text/plain; charset="us-ascii"
Hi all,
I had a problem where I couldn't print Chinese and English on barcode labels
using Koha's built-in Label Creator, since it uses individual font files and
I couldn't find a free and open individual font that supports both European
and Chinese scripts.
Fortunately, I recalled that Kyle @ ByWater Solutions created this plugin:
https://github.com/bywatersolutions/koha-plugin-label-maker. It uses HTML
and CSS to generate labels in the browser, and the browser is already
capable of using multiple different fonts to support multiple different
scripts. The plugin did a great job of rendering barcodes with both Chinese
and English written on them! Thanks, Bywater Solutions, for saving the day!
--
Nerdy thoughts:
If I look at the "Computed" styles in the F12 tools in Chrome on Windows 10,
it says the English is rendered using the "Times New Roman" font, and it
says that the Chinese is rendered using the "Microsoft YaHei" font. If I do
the same thing in Microsoft Word, the English is in "Calibri" and the
Chinese is in "DengXian". If you read
https://fonts.google.com/noto/use#how-are-noto-fonts-organized it says "If
you have text in multiple languages that use different scripts, either the
app or the person who typesets the text needs to switch between the
different fonts accordingly."
I'm not an expert on fonts, so I'm not sure what would be involved with
getting Koha's PDF libraries to use different fonts for different scripts. I
don't know how Chrome and Word detect that they need to use a different
font. I don't know if it's a map of Unicode codepoints to existing font
mappings, or if it iterates through a list of fallbacks, or what.
I probably won't go too far down this rabbit hole, since the ByWater Koha
Plugin solved my immediate use case, but it's an interesting topic, and this
is a major limitation with Koha's Label Creator, so we might want to think
about a change in the future...
David Cook
Senior Software Engineer
Prosentient Systems
Suite 7.03
6a Glen St
Milsons Point NSW 2061
Australia
Office: 02 9212 0899
Online: 02 8005 0595
------------------------------
Message: 2
Date: Thu, 30 Jun 2022 15:18:26 +0530
From: Indranil Das Gupta <indradg@l2c2.co.in>
To: dcook@prosentient.com.au
Cc: Koha-devel <koha-devel@lists.koha-community.org>, Kyle Hall
<kyle@bywatersolutions.com>, Brendan Gallagher
<brendan@bywatersolutions.com>
Subject: Re: [Koha-devel] Multilingual label printing in Koha (praise
be to Bywater!)
Message-ID:
<CAJ0y-De00GEmPaeCOnHjPLxDAWnU=A0K_Rmme4RhCmsznheO7Q@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
Yep! the Bywater Solutions plugin by Kyle does the job nicely "outside the
box" :-)
IIRC the label printing code was last worked on by Chris N a long long time
back. As far as I can tell the non Latin printing issue is due to the PDF
library we are using. Prolly needs a rewrite for that part which requires
both time and funds :-(
-Indranil
On Thu, 30 Jun, 2022, 12:34 pm , <dcook@prosentient.com.au> wrote:
> Hi all,
>
> I had a problem where I couldn't print Chinese and English on barcode
> labels
> using Koha's built-in Label Creator, since it uses individual font files
> and
> I couldn't find a free and open individual font that supports both European
> and Chinese scripts.
>
> Fortunately, I recalled that Kyle @ ByWater Solutions created this plugin:
> https://github.com/bywatersolutions/koha-plugin-label-maker. It uses HTML
> and CSS to generate labels in the browser, and the browser is already
> capable of using multiple different fonts to support multiple different
> scripts. The plugin did a great job of rendering barcodes with both Chinese
> and English written on them! Thanks, Bywater Solutions, for saving the day!
>
> --
> Nerdy thoughts:
>
> If I look at the "Computed" styles in the F12 tools in Chrome on Windows
> 10,
> it says the English is rendered using the "Times New Roman" font, and it
> says that the Chinese is rendered using the "Microsoft YaHei" font. If I do
> the same thing in Microsoft Word, the English is in "Calibri" and the
> Chinese is in "DengXian". If you read
> https://fonts.google.com/noto/use#how-are-noto-fonts-organized it says "If
> you have text in multiple languages that use different scripts, either the
> app or the person who typesets the text needs to switch between the
> different fonts accordingly."
>
> I'm not an expert on fonts, so I'm not sure what would be involved with
> getting Koha's PDF libraries to use different fonts for different scripts.
> I
> don't know how Chrome and Word detect that they need to use a different
> font. I don't know if it's a map of Unicode codepoints to existing font
> mappings, or if it iterates through a list of fallbacks, or what.
>
> I probably won't go too far down this rabbit hole, since the ByWater Koha
> Plugin solved my immediate use case, but it's an interesting topic, and
> this
> is a major limitation with Koha's Label Creator, so we might want to think
> about a change in the future...
>
> David Cook
> Senior Software Engineer
> Prosentient Systems
> Suite 7.03
> 6a Glen St
> Milsons Point NSW 2061
> Australia
>
> Office: 02 9212 0899
> Online: 02 8005 0595
>
>
> _______________________________________________
> Koha-devel mailing list
> Koha-devel@lists.koha-community.org
> https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
> website : https://www.koha-community.org/
> git : https://git.koha-community.org/
> bugs : https://bugs.koha-community.org/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20220630/818ac54b/attachment-0001.htm>
------------------------------
Subject: Digest Footer
_______________________________________________
Koha-devel mailing list
Koha-devel@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
website : https://www.koha-community.org/
git : https://git.koha-community.org/
bugs : https://bugs.koha-community.org/
------------------------------
End of Koha-devel Digest, Vol 199, Issue 26
*******************************************
NOTE: You are receiving this mail because, the Requester/Technician wanted you to get notified on this request creation.