Hello,
Sorry, I mixed up with another library which do not use font attributions but the selection of the specific font name ("arialb" for "arial bold").
So, we will add the attributes directly in the PDFSerial configuration !
Please edit the file "pdfserial_configuration.php" and replace
<?php echo JHTML::_('select.genericlist', $fonts, $map.'[font]', 'class="custom-select"', 'value', 'text', @$text['font'], 'attserial_fonts_' . $i); ?><br/>
By
<?php echo JHTML::_('select.genericlist', $fonts, $map.'[font]', 'class="custom-select"', 'value', 'text', @$text['font'], 'attserial_fonts_' . $i); ?><br/>
<label><input type="checkbox" name="<?php echo $map ?>[font_attr][]" value="b" <?php echo (in_array($text['font_attr'] ?? [], 'b')) ? 'checked="checked"' : ''; ?>/> Bold</label>
<label><input type="checkbox" name="<?php echo $map ?>[font_attr][]" value="i" <?php echo (in_array($text['font_attr'] ?? [], 'i')) ? 'checked="checked"' : ''; ?>/> Italic</label>
<label><input type="checkbox" name="<?php echo $map ?>[font_attr][]" value="u" <?php echo (in_array($text['font_attr'] ?? [], 'u')) ? 'checked="checked"' : ''; ?>/> Underline</label>
Then edit the file "pdfserial.php" and replace
$pdf->SetFont($font, '', (int)$d['size']);
with
$font_attr = '';
if(!empty($d['font_attr'])) {
$font_attr = array_intersect($d['font_attr'], array('b','i','u'));
$font_attr = strtoupper(implode('', $font_attr));
}
$pdf->SetFont($font, $font_attr, (int)$d['size']);
In the same file, you will have to replace two times the line (be careful with the added comas)
By
'font' => @$text['font'],
'font_attr' => @$text['font_attr'],
With that patch, you will have the base for the font attributes.
But if you add new rows to the configuration, the won't have the attributes until you save the configuration.
Regards,