Viewing 12 replies - 1 through 12 (of 12 total)
  • Hello, do you see this error in every browser? Just in Firefox?

    Thanks,

    Kai · The WpUtd Team
    Visit http://wordpressuptodate.com

    Thread Starter andriuss

    (@andriuss)

    Hi, thanks for reply. Yes its the same in main browsers chrome, FF, safari, opera

    Plugin Contributor Ewout

    (@pomegranate)

    Hello Andriuss,
    That sounds like your server may not have the MBString extension installed. You can check this on the status page of the plugin. See this related thread:
    https://wordpress.org/support/topic/accents-in-spanish-are-not-shown?replies=5

    Hope that helps!
    Ewout

    Thread Starter andriuss

    (@andriuss)

    I have checked but MBString extension is installed on server phpinfo():

    Multibyte Support enabled
    Multibyte string engine libmbfl
    HTTP input encoding translation disabled

    mbstring extension makes use of “streamable kanji code filter and converter”, which is distributed under the GNU Lesser General Public License version 2.1.

    Multibyte (japanese) regex support enabled
    Multibyte regex (oniguruma) backtrack check On
    Multibyte regex (oniguruma) version 4.7.1

    mbstring.detect_order no value no value
    mbstring.encoding_translation Off Off
    mbstring.func_overload 0 0
    mbstring.http_input pass pass
    mbstring.http_output pass pass
    mbstring.http_output_conv_mimetypes ^(text/|application/xhtml\+xml) ^(text/|application/xhtml\+xml)
    mbstring.internal_encoding no value no value
    mbstring.language neutral neutral
    mbstring.strict_detection Off Off
    mbstring.substitute_character no value no value

    Plugin Contributor Ewout

    (@pomegranate)

    Another possible cause is that the font is not properly downloading. Try using the method described in the FAQ instead, it’s better!

    Let me know if that helps!

    Thread Starter andriuss

    (@andriuss)

    Ok to be sure what I made:

    I am using standart template “Simple”.
    1. inside this template i created folder “Fonts” and copied font.
    2. edited file invoice.php and after <?php global $wpo_wcpdf; ?> i added:

    <style>
        /* Load font */
        @font-face {
            font-family: 'padthai';
            font-style: normal;
            font-weight: normal;
            src: local('padthai'), local('padthai'), url(<?php echo $wpo_wcpdf->export->template_path; ?>/fonts/padthai.ttf) format('truetype');
        }
        body{
            font-family: 'padthai';
        }
        </style>

    But still no luck… it shows boxed characters…
    I added one thai word inside invoice.php to check maybe is problem with translation … but show boxed too..

    Any ideas ?

    Thread Starter andriuss

    (@andriuss)

    I have changed to another font: Loma.ttf which is Thai font. So when I write in template Thai language word it generated correct. But other words is with ????????? characters.

    Updated: I changed in invoice.php translation from for example:
    from: __( ‘Invoice’, ‘wpo_wcpdf’ )
    to: __( ‘Invoice’, ‘woocommerce’ )

    and it helped in some field but where is $wpo_wcpdf->get_woocommerce_totals()

    There shows ????????….

    Thread Starter andriuss

    (@andriuss)

    I solved problem this is with font, but one problem in domPDF ther is cache file I think it maybe problem for new fonts. I added new font but it again shows ?????? how can I add to cache new font ?

    Plugin Contributor Ewout

    (@pomegranate)

    Hello Andriuss,
    Glad to hear you solved the problem!

    The only way to add the font to the cache is via the stylesheets – the first time dompdf encounters a font, it will convert it to the proper format. Remote fonts do not always work on the server (note that this is different from regular webpages!), but the local paths mostly work.

    In my tests I have discovered that if DOMPDF had loaded the font once the wrong way (for example because you used a remote font, or because you made an error in the @font-face declaration), it doesn’t correct that afterwards. The most simple way to fix this is by removing the font from the cache file (not the complete file!). The font cache file is located in:
    wp-content/uploads/wpo_wcpdf/fonts/dompdf_font_family_cache.php
    I think it’s also best if you then delete the font files for that specific font (in the same folder). The name of the font is a long code, but you can see in the font cache file which file belongs to which fonts.

    Hope that helps!

    Ewout

    Great you solved it, sorry for the delay, I had some days off.

    Thread Starter andriuss

    (@andriuss)

    Thank you for great support! Your plugin is awesome!

    Plugin Contributor Ewout

    (@pomegranate)

    You’re welcome Andriuss! Glad I could help!

Viewing 12 replies - 1 through 12 (of 12 total)

The topic ‘Thai language boxed characters’ is closed to new replies.