mPDF Manual – mPDF Variables

falseBoldWeight

(mPDF >= 4.2)

falseBoldWeight – Specify weight used for bold text when using an artificial (outline) bold

Description

void falseBoldWeight

Specify weight used for bold text when using an artificial (outline) bold. If bold text is set by <b> and the current font does not have a font file for the bold variant, an artificial bold is created by stroking the outline of the characters. This variable sets the width of the line and thus the “weight” of the bold text. Values between 0 and 10 are recommended.

Values

$falseBoldWeight

Values

INTEGER : set weight of bold text

DEFAULT: 5

Changelog

VersionDescription
4.2 Variable was added.

Examples

Example #1

<?php

// Require composer autoload
require_once __DIR__ . '/vendor/autoload.php';

$mpdf = new mPDF();

$mpdf->falseBoldWeight = 8;

$mpdf->WriteHTML('<p style="font-family: mysimplefont">**Hallo World**<p>');

$mpdf->Output();

?>