Why do I get warning about Common Hyphenation while creating pdf with MATLAB Report Generator?
1 回表示 (過去 30 日間)
古いコメントを表示
MathWorks Support Team
2020 年 9 月 14 日
編集済み: MathWorks Support Team
2025 年 1 月 31 日
I am generating a pdf using MATLAB Report Generator. In my code, I specified 'Helvetica' as FontFamily for a table header.
import mlreportgen.dom.*
t = Table();
t.TableEntriesStyle = { FontFamily('Helvetica') };
I am getting the following warning. However, the warning does not affect the desired output and the pdf is generated appropriately.
[WARN] CommonHyphenation - Substituted specified hyphenation character (0x200b) with 0x20 because the font doesn't have the specified hyphenation character: Helvetica,normal,400
Please explain what is the root cause of this warning and how to suppress it. I am using MATLAB R2019b.
採用された回答
MathWorks Support Team
2025 年 1 月 25 日
編集済み: MathWorks Support Team
2025 年 1 月 31 日
This is an expected behavior while using the DOM API. ‘mlreportgen.dom.Table’ uses a zero-width space (character x200b) as its hyphenation character. If a user-specified font (‘Helvetica’ in your case) does not have this character, MATLAB will replace that character using one of our built-in backup fonts (Noto Sans, Noto Sans CJK JP, Noto Sans CJK KR, Noto Sans CJK SC, Noto Emoji), which do have this character. This warning is appearing to inform you about this font change.
Try specifying one of the backup fonts (Noto Sans, Noto Sans CJK JP, Noto Sans CJK KR, Noto Sans CJK SC, Noto Emoji) and check if the warning still exists.
The warning itself does not affect the execution of code and the output. If desired, you can suppress this warning by following the procedure mentioned in the "Suppress Warnings" documentation. Execute the following command in the MATLAB R2019b Command Window to access the release-specific documentation:
>> web(fullfile(docroot, 'matlab/matlab_prog/suppress-warnings.html'))
Please follow the below link to search for the required information regarding the current release:
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で MATLAB Report Generator についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!