<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:DengXian;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"\@DengXian";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-AU link=blue vlink=purple><div class=WordSection1><p class=MsoNormal>Ok I have a patch at <a href="https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25384">https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25384</a>. I haven’t applied it locally, so I’m not super invested in this approach at this point. Open to feedback and testing!<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>(Really I should add some unit tests to t/db_dependent/Creators/Lib.t and t/Creators.t as well to prove the configurability and not just default behaviour. Suppose I wanted to see first if people approved of the approach before finishing it 100%.)<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>David Cook<o:p></o:p></p><p class=MsoNormal>Systems Librarian<o:p></o:p></p><p class=MsoNormal>Prosentient Systems<o:p></o:p></p><p class=MsoNormal>72/330 Wattle St<o:p></o:p></p><p class=MsoNormal>Ultimo, NSW 2007<o:p></o:p></p><p class=MsoNormal>Australia<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Office: 02 9212 0899<o:p></o:p></p><p class=MsoNormal>Online: 02 8005 0595<o:p></o:p></p></div><p class=MsoNormal><o:p> </o:p></p><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US>From:</span></b><span lang=EN-US> Koha-devel <koha-devel-bounces@lists.koha-community.org> <b>On Behalf Of </b>dcook@prosentient.com.au<br><b>Sent:</b> Wednesday, 6 May 2020 11:37 AM<br><b>To:</b> 'Christopher Nighswonger' <chris.nighswonger@gmail.com>; 'Bernardo Gonzalez Kriegel' <bgkriegel@gmail.com><br><b>Cc:</b> 'koha-devel' <koha-devel@lists.koha-community.org><br><b>Subject:</b> Re: [Koha-devel] Adding fonts to Koha for label creator<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Thanks again for your help!<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I’ve tried your suggestion, and I tried adding options to C4::Creators::Lib with mappings in koha-conf.xml. Both ideas worked.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>For now, I think I’ll advise people to use your suggestion (and use Javascript to change the labels in the Staff client).<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I’ve opened a bug report (<a href="https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25384">https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25384</a>) to improve this in the future. I think I’ll even have a quick crack at it.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Cheers,<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>David Cook<o:p></o:p></p><p class=MsoNormal>Systems Librarian<o:p></o:p></p><p class=MsoNormal>Prosentient Systems<o:p></o:p></p><p class=MsoNormal>72/330 Wattle St<o:p></o:p></p><p class=MsoNormal>Ultimo, NSW 2007<o:p></o:p></p><p class=MsoNormal>Australia<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Office: 02 9212 0899<o:p></o:p></p><p class=MsoNormal>Online: 02 8005 0595<o:p></o:p></p></div><p class=MsoNormal><o:p> </o:p></p><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US>From:</span></b><span lang=EN-US> Koha-devel <<a href="mailto:koha-devel-bounces@lists.koha-community.org">koha-devel-bounces@lists.koha-community.org</a>> <b>On Behalf Of </b><a href="mailto:dcook@prosentient.com.au">dcook@prosentient.com.au</a><br><b>Sent:</b> Tuesday, 5 May 2020 9:21 AM<br><b>To:</b> 'Christopher Nighswonger' <<a href="mailto:chris.nighswonger@gmail.com">chris.nighswonger@gmail.com</a>>; 'Bernardo Gonzalez Kriegel' <<a href="mailto:bgkriegel@gmail.com">bgkriegel@gmail.com</a>><br><b>Cc:</b> 'koha-devel' <<a href="mailto:koha-devel@lists.koha-community.org">koha-devel@lists.koha-community.org</a>><br><b>Subject:</b> Re: [Koha-devel] Adding fonts to Koha for label creator<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Thanks Chris and Bernardo for getting back to me so quickly.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>That’s good to know, although from the user experience point of view I don’t think that it’ll be sufficient, since it would still have the old font name in the web UI. <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I’ll take a deeper look today and report back. <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>David Cook<o:p></o:p></p><p class=MsoNormal>Systems Librarian<o:p></o:p></p><p class=MsoNormal>Prosentient Systems<o:p></o:p></p><p class=MsoNormal>72/330 Wattle St<o:p></o:p></p><p class=MsoNormal>Ultimo, NSW 2007<o:p></o:p></p><p class=MsoNormal>Australia<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Office: 02 9212 0899<o:p></o:p></p><p class=MsoNormal>Online: 02 8005 0595<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US>From:</span></b><span lang=EN-US> Christopher Nighswonger <<a href="mailto:chris.nighswonger@gmail.com">chris.nighswonger@gmail.com</a>> <br><b>Sent:</b> Monday, 4 May 2020 10:51 PM<br><b>To:</b> Bernardo Gonzalez Kriegel <<a href="mailto:bgkriegel@gmail.com">bgkriegel@gmail.com</a>><br><b>Cc:</b> David Cook <<a href="mailto:dcook@prosentient.com.au">dcook@prosentient.com.au</a>>; koha-devel <<a href="mailto:koha-devel@lists.koha-community.org">koha-devel@lists.koha-community.org</a>><br><b>Subject:</b> Re: [Koha-devel] Adding fonts to Koha for label creator<o:p></o:p></span></p></div><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal><o:p> </o:p></p><div><div><p class=MsoNormal>On Mon, May 4, 2020 at 6:25 AM Bernardo Gonzalez Kriegel <<a href="mailto:bgkriegel@gmail.com">bgkriegel@gmail.com</a>> wrote:<o:p></o:p></p></div><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt'><div><div><div><p class=MsoNormal>Hi David,<o:p></o:p></p><div><p class=MsoNormal> <o:p></o:p></p></div></div><div><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt'><div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>How does one add fonts to Koha for the label creator?<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>I’m curious about adding “Arial” ( or rather LiberationSans-Regular.ttf as matched by fc-match) and “Arial Bold” (or rather Roboto-Regular.ttf as matched by fc-match) to the Koha label creator.<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>I see we have a hard-coded list of font types in C4/Creators/Lib.pm. There is also a list of TTF files in etc/koha-conf.xml.<o:p></o:p></p></div></div></blockquote><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Changing paths in koha-conf.xml is enough, replacing entries for H and HB or any other.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div></div></div></div></blockquote><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Hard-coded fonts are effectively defaults. They are installed by a dependency (I don't recall which atm.).<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Substituting fonts is done as Bernardo pointed out.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Chris<o:p></o:p></p></div></div></div></div></body></html>