Bug 8375: (follow-up) fix font code and alignment
authorBernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Sun, 20 Apr 2014 23:23:51 +0000 (20:23 -0300)
committerGalen Charlton <gmc@esilibrary.com>
Mon, 5 May 2014 21:55:16 +0000 (21:55 +0000)
commit845af199157ffb82f93d33682ea9910fb38af8b7
tree6f43b8f5c32f268df42f6bdceb0630f93171161a
parent8e71489c33115254a8a95be7a4b1a82b605918c9
Bug 8375: (follow-up) fix font code and alignment

This patch fixes two problems:
a) Bad PDF when using Helvetica font.
Current label code assigns 'italic' or 'oblique' variants
to title. Helvetica-Oblique was not defined, but is present

b) Bad alignment using center/right justification
Problem was bad font parameter passed to StrWidth
routine

To test:
1. Try making a batch using Helvetica, downloaded PDF do not open.
2. Try a batch of mixed scripts with layout alignment center or
   right, only latin scripts align almost correctly.
3. Apply the patch and update your koha-conf.xml to add Oblique variant
4. Try again 1, now PDF opens
5. Try 2, now alignment is correct

New problem (for another bug): DejaVuSans has a good
support for arabic, but not Oblique variant. As selection
of italic/oblique is hardcoded, now Arabic titles are
not displayed. I'll try to add a checkbox to select
or not this feature.

Added a FIXME for the hardcoded forced oblique -chris_n

Signed-off-by: Chris Nighswonger <cnighswonger@foundations.edu>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
C4/Creators/Lib.pm
C4/Labels/Label.pm
etc/koha-conf.xml