<div dir="auto">Yep! the Bywater Solutions plugin by Kyle does the job nicely "outside the box" :-) <div dir="auto"><br></div><div dir="auto">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 :-( </div><div dir="auto"><br></div><div dir="auto">-Indranil </div><div dir="auto"><br></div><div dir="auto"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 30 Jun, 2022, 12:34 pm , <<a href="mailto:dcook@prosentient.com.au">dcook@prosentient.com.au</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi all,<br>
<br>
I had a problem where I couldn't print Chinese and English on barcode labels<br>
using Koha's built-in Label Creator, since it uses individual font files and<br>
I couldn't find a free and open individual font that supports both European<br>
and Chinese scripts.<br>
<br>
Fortunately, I recalled that Kyle @ ByWater Solutions created this plugin:<br>
<a href="https://github.com/bywatersolutions/koha-plugin-label-maker" rel="noreferrer noreferrer" target="_blank">https://github.com/bywatersolutions/koha-plugin-label-maker</a>. It uses HTML<br>
and CSS to generate labels in the browser, and the browser is already<br>
capable of using multiple different fonts to support multiple different<br>
scripts. The plugin did a great job of rendering barcodes with both Chinese<br>
and English written on them! Thanks, Bywater Solutions, for saving the day!<br>
<br>
--<br>
Nerdy thoughts:<br>
<br>
If I look at the "Computed" styles in the F12 tools in Chrome on Windows 10,<br>
it says the English is rendered using the "Times New Roman" font, and it<br>
says that the Chinese is rendered using the "Microsoft YaHei" font. If I do<br>
the same thing in Microsoft Word, the English is in "Calibri" and the<br>
Chinese is in "DengXian". If you read<br>
<a href="https://fonts.google.com/noto/use#how-are-noto-fonts-organized" rel="noreferrer noreferrer" target="_blank">https://fonts.google.com/noto/use#how-are-noto-fonts-organized</a> it says "If<br>
you have text in multiple languages that use different scripts, either the<br>
app or the person who typesets the text needs to switch between the<br>
different fonts accordingly."<br>
<br>
I'm not an expert on fonts, so I'm not sure what would be involved with<br>
getting Koha's PDF libraries to use different fonts for different scripts. I<br>
don't know how Chrome and Word detect that they need to use a different<br>
font. I don't know if it's a map of Unicode codepoints to existing font<br>
mappings, or if it iterates through a list of fallbacks, or what. <br>
<br>
I probably won't go too far down this rabbit hole, since the ByWater Koha<br>
Plugin solved my immediate use case, but it's an interesting topic, and this<br>
is a major limitation with Koha's Label Creator, so we might want to think<br>
about a change in the future...<br>
<br>
David Cook<br>
Senior Software Engineer<br>
Prosentient Systems<br>
Suite 7.03<br>
6a Glen St<br>
Milsons Point NSW 2061<br>
Australia<br>
<br>
Office: 02 9212 0899<br>
Online: 02 8005 0595<br>
<br>
<br>
_______________________________________________<br>
Koha-devel mailing list<br>
<a href="mailto:Koha-devel@lists.koha-community.org" target="_blank" rel="noreferrer">Koha-devel@lists.koha-community.org</a><br>
<a href="https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel" rel="noreferrer noreferrer" target="_blank">https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel</a><br>
website : <a href="https://www.koha-community.org/" rel="noreferrer noreferrer" target="_blank">https://www.koha-community.org/</a><br>
git : <a href="https://git.koha-community.org/" rel="noreferrer noreferrer" target="_blank">https://git.koha-community.org/</a><br>
bugs : <a href="https://bugs.koha-community.org/" rel="noreferrer noreferrer" target="_blank">https://bugs.koha-community.org/</a><br>
</blockquote></div>