Skip to content

Instantly share code, notes, and snippets.

@cliffordp
Last active May 17, 2018 02:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cliffordp/fc28362e889bf740c8c08d38b46d7475 to your computer and use it in GitHub Desktop.
Save cliffordp/fc28362e889bf740c8c08d38b46d7475 to your computer and use it in GitHub Desktop.
Event Tickets: PDF Tickets extension version 1.1.0+: Override mPDF arguments to unset the 'mode' => 'c' (which says to use the system's default fonts).
<?php
/**
* Event Tickets: PDF Tickets extension version 1.1.0+: Override mPDF arguments
* to unset the 'mode' => 'c' (which says to use the system's default fonts).
*
* Implementing this snippet will make it so mPDF's default DejaVu font
* (screenshot: https://cl.ly/3A3w3X1x1731) is used, which supports a wider
* range of special characters than system fonts (screenshot: https://cl.ly/3Q162V0R403O).
*
* @link https://gist.github.com/cliffordp/fc28362e889bf740c8c08d38b46d7475
* @link https://mpdf.github.io/reference/mpdf-variables/overview.html An outdated reference.
* @link https://theeventscalendar.com/extensions/pdf-tickets/
*/
add_filter( 'tribe_ext_pdf_tickets_mpdf_args', function ( $mpdf_args ) {
if ( isset( $mpdf_args['mode'] ) ) {
unset( $mpdf_args['mode'] );
}
return $mpdf_args;
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment