https://www.redmine.org/
https://www.redmine.org/favicon.ico?1679302129
2015-02-05T19:48:58Z
Redmine
Redmine - Defect #19017: Wiki PDF Export: <pre> not rendered with monospaced font
https://www.redmine.org/issues/19017?journal_id=61319
2015-02-05T19:48:58Z
Marcel Müller
<ul></ul><p>I think the problem is in <a href="http://www.redmine.org/projects/redmine/repository/revisions/13944/entry/trunk/lib/redmine/export/pdf.rb#L45" class="external">this line</a>. "set_default_monospaced_font" should not be set to the default content-font (a non monospaced font). Removing this line works for me.</p>
Redmine - Defect #19017: Wiki PDF Export: <pre> not rendered with monospaced font
https://www.redmine.org/issues/19017?journal_id=61821
2015-03-03T14:24:50Z
Toshi MARUYAMA
<ul><li><strong>File</strong> <a href="/attachments/13227">fonts.png</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/13227/fonts.png">fonts.png</a> added</li></ul><p>Marcel Müller wrote:</p>
<blockquote>
<p>Removing this line works for me.</p>
</blockquote>
<p>But, Cyrillic is broken.<br /><img src="https://www.redmine.org/attachments/download/13227/fonts.png" alt="" /></p>
Redmine - Defect #19017: Wiki PDF Export: <pre> not rendered with monospaced font
https://www.redmine.org/issues/19017?journal_id=61822
2015-03-03T14:27:41Z
Toshi MARUYAMA
<ul></ul><p>I have created issue.<br /><a class="external" href="https://github.com/naitoh/rbpdf/issues/11">https://github.com/naitoh/rbpdf/issues/11</a></p>
Redmine - Defect #19017: Wiki PDF Export: <pre> not rendered with monospaced font
https://www.redmine.org/issues/19017?journal_id=67427
2015-11-21T05:52:27Z
Jun NAITOH
<ul><li><strong>File</strong> <a href="/attachments/14695">rbpdf-1.19.0_ monospaced_font.pdf</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/14695/rbpdf-1.19.0_%20monospaced_font.pdf">rbpdf-1.19.0_ monospaced_font.pdf</a> added</li><li><strong>File</strong> <a href="/attachments/14697">pdf_monospaced_font_r14882.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/14697/pdf_monospaced_font_r14882.patch">pdf_monospaced_font_r14882.patch</a> added</li></ul><p>This is font problem.</p>
<p>rbpdf 1.19.0 was added DejaVu SansMono font,<br />and <strong>Supported for font subsetting.</strong> (for reduce the size of documents using large unicode font files.)</p>
<p>Please use monospaced font. (see attached patch and sample pdf.)</p>
<a name="language-font-list"></a>
<h2 >language font list<a href="#language-font-list" class="wiki-anchor">¶</a></h2>
<table>
<tr>
<th>config/locales</th>
<th>Proportional font</th>
<th>Monospaced font</th>
<th>notes</th>
</tr>
<tr>
<td>ar.yml</td>
<td>DejaVuSans</td>
<td>DejaVuSansMono</td>
<td>DejaVuSansMono Italic Arabic font has problem.</td>
</tr>
<tr>
<td>az.yml</td>
<td>freesans</td>
<td>freemono</td>
<td></td>
</tr>
<tr>
<td>bg.yml</td>
<td>freesans</td>
<td>freemono</td>
<td></td>
</tr>
<tr>
<td>bs.yml</td>
<td>freesans</td>
<td>freemono</td>
<td></td>
</tr>
<tr>
<td>ca.yml</td>
<td>freesans</td>
<td>freemono</td>
<td></td>
</tr>
<tr>
<td>cs.yml</td>
<td>freesans</td>
<td>freemono</td>
<td></td>
</tr>
<tr>
<td>da.yml</td>
<td>freesans</td>
<td>freemono</td>
<td></td>
</tr>
<tr>
<td>de.yml</td>
<td>freesans</td>
<td>freemono</td>
<td></td>
</tr>
<tr>
<td>el.yml</td>
<td>freesans</td>
<td>freemono</td>
<td></td>
</tr>
<tr>
<td>en-GB.yml</td>
<td>freesans</td>
<td>freemono</td>
<td></td>
</tr>
<tr>
<td>en.yml</td>
<td>freesans</td>
<td>freemono</td>
<td></td>
</tr>
<tr>
<td>es-PA.yml</td>
<td>freesans</td>
<td>freemono</td>
<td></td>
</tr>
<tr>
<td>es.yml</td>
<td>freesans</td>
<td>freemono</td>
<td></td>
</tr>
<tr>
<td>et.yml</td>
<td>freesans</td>
<td>freemono</td>
<td></td>
</tr>
<tr>
<td>eu.yml</td>
<td>freesans</td>
<td>freemono</td>
<td></td>
</tr>
<tr>
<td>fa.yml</td>
<td>DejaVuSans</td>
<td>DejaVuSans</td>
<td>DejaVuSansMono Persian font has problem.</td>
</tr>
<tr>
<td>fi.yml</td>
<td>freesans</td>
<td>freemono</td>
<td></td>
</tr>
<tr>
<td>fr.yml</td>
<td>freesans</td>
<td>freemono</td>
<td></td>
</tr>
<tr>
<td>gl.yml</td>
<td>freesans</td>
<td>freemono</td>
<td></td>
</tr>
<tr>
<td>he.yml</td>
<td>freesans</td>
<td>freemono</td>
<td></td>
</tr>
<tr>
<td>hr.yml</td>
<td>freesans</td>
<td>freemono</td>
<td></td>
</tr>
<tr>
<td>hu.yml</td>
<td>freesans</td>
<td>freemono</td>
<td></td>
</tr>
<tr>
<td>id.yml</td>
<td>freesans</td>
<td>freemono</td>
<td></td>
</tr>
<tr>
<td>it.yml</td>
<td>freesans</td>
<td>freemono</td>
<td></td>
</tr>
<tr>
<td>ja.yml</td>
<td>kozminproregular</td>
<td>kozminproregular</td>
<td></td>
</tr>
<tr>
<td>ko.yml</td>
<td>hysmyeongjostdmedium</td>
<td>hysmyeongjostdmedium</td>
<td></td>
</tr>
<tr>
<td>lt.yml</td>
<td>freesans</td>
<td>freemono</td>
<td></td>
</tr>
<tr>
<td>lv.yml</td>
<td>freesans</td>
<td>freemono</td>
<td></td>
</tr>
<tr>
<td>mk.yml</td>
<td>freesans</td>
<td>freemono</td>
<td></td>
</tr>
<tr>
<td>mn.yml</td>
<td>freesans</td>
<td>freemono</td>
<td></td>
</tr>
<tr>
<td>nl.yml</td>
<td>freesans</td>
<td>freemono</td>
<td></td>
</tr>
<tr>
<td>no.yml</td>
<td>freesans</td>
<td>freemono</td>
<td></td>
</tr>
<tr>
<td>pl.yml</td>
<td>freesans</td>
<td>freemono</td>
<td></td>
</tr>
<tr>
<td>pt-BR.yml</td>
<td>freesans</td>
<td>freemono</td>
<td></td>
</tr>
<tr>
<td>pt.yml</td>
<td>freesans</td>
<td>freemono</td>
<td></td>
</tr>
<tr>
<td>ro.yml</td>
<td>freesans</td>
<td>freemono</td>
<td></td>
</tr>
<tr>
<td>ru.yml</td>
<td>freesans</td>
<td>freemono</td>
<td></td>
</tr>
<tr>
<td>sk.yml</td>
<td>freesans</td>
<td>freemono</td>
<td></td>
</tr>
<tr>
<td>sl.yml</td>
<td>freesans</td>
<td>freemono</td>
<td></td>
</tr>
<tr>
<td>sq.yml</td>
<td>freesans</td>
<td>freemono</td>
<td></td>
</tr>
<tr>
<td>sr-YU.yml</td>
<td>freesans</td>
<td>freemono</td>
<td></td>
</tr>
<tr>
<td>sr.yml</td>
<td>freesans</td>
<td>freemono</td>
<td></td>
</tr>
<tr>
<td>sv.yml</td>
<td>freesans</td>
<td>freemono</td>
<td></td>
</tr>
<tr>
<td>th.yml</td>
<td>freeserif</td>
<td>freeserif</td>
<td>freesans and freemono Thai fonts have problem.</td>
</tr>
<tr>
<td>tr.yml</td>
<td>freesans</td>
<td>freemono</td>
<td></td>
</tr>
<tr>
<td>uk.yml</td>
<td>freesans</td>
<td>freemono</td>
<td></td>
</tr>
<tr>
<td>vi.yml</td>
<td>DejaVuSans</td>
<td>DejaVuSans</td>
<td>DejaVuSansMono Vietnamese font has problem.</td>
</tr>
<tr>
<td>zh-TW.yml</td>
<td>msungstdlight</td>
<td>msungstdlight</td>
<td></td>
</tr>
<tr>
<td>zh.yml</td>
<td>stsongstdlight</td>
<td>stsongstdlight</td>
<td></td>
</tr>
</table>
Redmine - Defect #19017: Wiki PDF Export: <pre> not rendered with monospaced font
https://www.redmine.org/issues/19017?journal_id=67445
2015-11-23T04:43:32Z
Go MAEDA
<ul><li><strong>Target version</strong> set to <i>3.2.0</i></li></ul><p>Thanks for the patch. Works fine for me.</p>
Redmine - Defect #19017: Wiki PDF Export: <pre> not rendered with monospaced font
https://www.redmine.org/issues/19017?journal_id=67569
2015-11-28T06:29:25Z
Toshi MARUYAMA
<ul><li><strong>Assignee</strong> set to <i>Toshi MARUYAMA</i></li></ul>
Redmine - Defect #19017: Wiki PDF Export: <pre> not rendered with monospaced font
https://www.redmine.org/issues/19017?journal_id=67639
2015-12-04T07:21:30Z
Toshi MARUYAMA
<ul><li><strong>File</strong> <a href="/attachments/14764">Arabic.txt</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/14764/Arabic.txt">Arabic.txt</a> added</li></ul><p>I have committed from <a class="changeset" title="pdf: use "family" parameter instead of l(:general_pdf_fontname) at SetFont method (#19017) Contr..." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/14907">r14907</a> to <a class="changeset" title="revert r14907 (#19017) r14907 breaks Arabic italic pdf rendering." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/14911">r14911</a> without this change.</p>
<pre><code class="diff syntaxhl"><span class="gh">=== (+3,-1) lib/redmine/export/pdf.rb ===
</span><span class="p">@@ -55,6 +55,8 @@</span>
style.delete!('B') if l(:general_pdf_fontname) == 'freeserif'
# DejaVuSans Italic Arabic and Persian font has problem.
style.delete!('I') if l(:general_pdf_fontname) == 'DejaVuSans' && current_language.to_s.casecmp("vi") != 0
<span class="gi">+ # DejaVuSansMono Italic Arabic font has problem.
+ style.delete!('I') if l(:general_pdf_fontname) == 'DejaVuSansMono'
</span> super(family, style, size, fontfile)
end
alias_method :set_font, :SetFont
</code></pre>
<p>I cannot see difference with and without this change on <a class="attachment" href="https://www.redmine.org/attachments/14764">Arabic.txt</a>.<br />Is this change needed?</p>
Redmine - Defect #19017: Wiki PDF Export: <pre> not rendered with monospaced font
https://www.redmine.org/issues/19017?journal_id=67640
2015-12-04T07:23:42Z
Toshi MARUYAMA
<ul></ul><p>Toshi MARUYAMA wrote:</p>
<blockquote>
<p>I cannot see difference with and without this change on <a class="attachment" href="https://www.redmine.org/attachments/14764">Arabic.txt</a>.</p>
</blockquote>
<p>On Arabic locale.</p>
Redmine - Defect #19017: Wiki PDF Export: <pre> not rendered with monospaced font
https://www.redmine.org/issues/19017?journal_id=67658
2015-12-05T06:26:21Z
Jun NAITOH
<ul></ul><blockquote>
<p>I cannot see difference with and without this change on <a class="attachment" href="https://www.redmine.org/attachments/14764">Arabic.txt</a>.<br />Is this change needed?</p>
</blockquote>
<p>I checked it once again. so, this change is unnecessary, Sorry.</p>
<p>Because Redmine 3.2(<a class="changeset" title="revert r14907 (#19017) r14907 breaks Arabic italic pdf rendering." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/14911">r14911</a>) used a monospaced font in the pre tag, but a style(bold/italic) wasn't applied in the pre tag.</p>
Redmine - Defect #19017: Wiki PDF Export: <pre> not rendered with monospaced font
https://www.redmine.org/issues/19017?journal_id=67667
2015-12-05T10:55:58Z
Toshi MARUYAMA
<ul><li><strong>File</strong> <a href="/attachments/14779">pdf.png</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/14779/pdf.png">pdf.png</a> added</li><li><strong>File</strong> <a href="/attachments/14782">html.png</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/14782/html.png">html.png</a> added</li></ul><p>But monospace italic is in HTML source.<br />Does not PDF support <code>"code"</code> and <code>%{font-style: italic; font-family: monospace}word%</code>?</p>
<pre>
%{font-style: italic; font-family: monospace}italic monospace%
_italic_
@monospace@
<pre>
pre
</pre>
</pre>
<p><img src="https://www.redmine.org/attachments/download/14782/html.png" alt="" /><br /><img src="https://www.redmine.org/attachments/download/14779/pdf.png" alt="" /></p>
Redmine - Defect #19017: Wiki PDF Export: <pre> not rendered with monospaced font
https://www.redmine.org/issues/19017?journal_id=67668
2015-12-05T14:26:49Z
Jun NAITOH
<ul></ul><p>Toshi MARUYAMA wrote:</p>
<blockquote>
<p>But monospace italic is in HTML source.<br />Does not PDF support <code>"code"</code> and <code>%{font-style: italic; font-family: monospace}word%</code>?</p>
</blockquote>
<p>PDF don't support <code>"code"</code> and <code>%{font-family: monospace}word%</code><br />but, PDF support <code>%{font-style: italic; font-family: DejaVuSansMono}word%</code></p>
<p>If use <code>%{font-style: italic; font-family: DejaVuSansMono}word%</code>, it's no problem by following setting on Arabic locale.<br /><pre>
style.delete!('I') if l(:general_pdf_fontname) == 'DejaVuSans' && current_language.to_s.casecmp("vi") != 0
</pre></p>
Redmine - Defect #19017: Wiki PDF Export: <pre> not rendered with monospaced font
https://www.redmine.org/issues/19017?journal_id=67673
2015-12-06T04:53:35Z
Toshi MARUYAMA
<ul></ul><p>I can see DejaVuSansMono italic has problem in Vietnamese, but I cannot see in Arabic.<br />Where is source?</p>
Redmine - Defect #19017: Wiki PDF Export: <pre> not rendered with monospaced font
https://www.redmine.org/issues/19017?journal_id=67674
2015-12-06T06:48:36Z
Toshi MARUYAMA
<ul></ul><p>Toshi MARUYAMA wrote:</p>
<blockquote>
<p>I can see DejaVuSansMono italic has problem in Vietnamese, but I cannot see in Arabic.</p>
</blockquote>
<p>This behaviour changes frequently. "<code>family</code>" parameter of SetFont() sometimes comes all lower-cases.<br /><a class="source" href="https://www.redmine.org/projects/redmine/repository/svn/revisions/14949/entry/trunk/lib/redmine/export/pdf.rb#L53">source:trunk/lib/redmine/export/pdf.rb@14949#L53</a><br /><a class="changeset" title="pdf: use "family" parameter instead of l(:general_pdf_fontname) at SetFont method (#19017) Contr..." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/14950">r14950</a> stabilizes behaviour changes.</p>
Redmine - Defect #19017: Wiki PDF Export: <pre> not rendered with monospaced font
https://www.redmine.org/issues/19017?journal_id=67675
2015-12-06T07:31:33Z
Toshi MARUYAMA
<ul></ul><p>Toshi MARUYAMA wrote:</p>
<blockquote>
<p><a class="changeset" title="pdf: use "family" parameter instead of l(:general_pdf_fontname) at SetFont method (#19017) Contr..." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/14950">r14950</a> stabilizes behaviour changes.</p>
</blockquote>
<p>But <a class="changeset" title="pdf: use "family" parameter instead of l(:general_pdf_fontname) at SetFont method (#19017) Contr..." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/14950">r14950</a> breaks Arabic italic pdf rendering again.<br />(I mistook <a class="changeset" title="revert r14950 (#19017) r14907 breaks Arabic italic pdf rendering." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/14951">r14951</a> comment.)</p>
Redmine - Defect #19017: Wiki PDF Export: <pre> not rendered with monospaced font
https://www.redmine.org/issues/19017?journal_id=67676
2015-12-06T07:45:10Z
Toshi MARUYAMA
<ul><li><strong>File</strong> <a href="/attachments/14783">ar-en.png</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/14783/ar-en.png">ar-en.png</a> added</li></ul><p>I try with this change on <a class="changeset" title="revert r14950 (#19017) r14907 breaks Arabic italic pdf rendering." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/14951">r14951</a>, English locale is OK, but Arabic locale is NG.<br />I think SetFont() has stability bug.<br /><pre>
%{font-style: italic; font-family: DejaVuSansMono}Tiếng Việt%
%{font-style: italic; font-family: DejaVuSansMono}عربي%
</pre></p>
<pre><code class="diff syntaxhl"><span class="gh">diff --git a/config/locales/ar.yml b/config/locales/ar.yml
</span><span class="gd">--- a/config/locales/ar.yml
</span><span class="gi">+++ b/config/locales/ar.yml
</span><span class="p">@@ -140,8 +140,8 @@</span>
general_csv_separator: ','
general_csv_decimal_separator: '.'
general_csv_encoding: ISO-8859-1
<span class="gd">- general_pdf_fontname: DejaVuSans
- general_pdf_monospaced_fontname: DejaVuSansMono
</span><span class="gi">+ general_pdf_fontname: freesans
+ general_pdf_monospaced_fontname: freemono
</span> general_first_day_of_week: '7'
notice_account_updated: لقد تم تجديد الحساب بنجاح.
<span class="gh">diff --git a/config/locales/en.yml b/config/locales/en.yml
</span><span class="gd">--- a/config/locales/en.yml
</span><span class="gi">+++ b/config/locales/en.yml
</span><span class="p">@@ -141,8 +141,8 @@</span>
general_csv_separator: ','
general_csv_decimal_separator: '.'
general_csv_encoding: ISO-8859-1
<span class="gd">- general_pdf_fontname: freesans
- general_pdf_monospaced_fontname: freemono
</span><span class="gi">+ general_pdf_fontname: DejaVuSans
+ general_pdf_monospaced_fontname: DejaVuSansMono
</span> general_first_day_of_week: '7'
notice_account_updated: Account was successfully updated.
</code></pre>
<p><img src="https://www.redmine.org/attachments/download/14783/ar-en.png" alt="" /></p>
Redmine - Defect #19017: Wiki PDF Export: <pre> not rendered with monospaced font
https://www.redmine.org/issues/19017?journal_id=67684
2015-12-06T11:24:22Z
Jean-Philippe Lang
jp_lang@yahoo.fr
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Closed</i></li></ul><p>I'm closing this for 3.2 release. If there any problems pending, please open another issue.</p>
Redmine - Defect #19017: Wiki PDF Export: <pre> not rendered with monospaced font
https://www.redmine.org/issues/19017?journal_id=67685
2015-12-06T12:27:42Z
Toshi MARUYAMA
<ul></ul><p><a class="changeset" title="pdf: use "family" parameter instead of l(:general_pdf_fontname) at SetFont method (#19017) Contr..." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/14950">r14950</a> is wrong.</p>
<pre><code class="ruby syntaxhl"><span class="n">style</span><span class="p">.</span><span class="nf">delete!</span><span class="p">(</span><span class="s1">'I'</span><span class="p">)</span> <span class="k">if</span> <span class="n">family</span><span class="p">.</span><span class="nf">to_s</span><span class="p">.</span><span class="nf">casecmp</span><span class="p">(</span><span class="s1">'DejaVuSans'</span><span class="p">)</span> <span class="o">!=</span> <span class="mi">0</span>
</code></pre>
<p>should be</p>
<pre><code class="ruby syntaxhl"><span class="n">style</span><span class="p">.</span><span class="nf">delete!</span><span class="p">(</span><span class="s1">'I'</span><span class="p">)</span> <span class="k">if</span> <span class="n">family</span><span class="p">.</span><span class="nf">to_s</span><span class="p">.</span><span class="nf">casecmp</span><span class="p">(</span><span class="s1">'DejaVuSans'</span><span class="p">)</span> <span class="o">==</span> <span class="mi">0</span>
</code></pre>
Redmine - Defect #19017: Wiki PDF Export: <pre> not rendered with monospaced font
https://www.redmine.org/issues/19017?journal_id=67686
2015-12-06T12:29:18Z
Toshi MARUYAMA
<ul></ul><p>Jean-Philippe Lang wrote:</p>
<blockquote>
<p>I'm closing this for 3.2 release. If there any problems pending, please open another issue.</p>
</blockquote>
<p>3.2-stable <a class="changeset" title="Merged r14960 from trunk to 3.2-stable (#19017) pdf: remove italic from DejaVuSansMono. DejaVuS..." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/14962">r14962</a> has completed.<br />Please release <a class="version" href="https://www.redmine.org/versions/102">3.2.0</a>.</p>
Redmine - Defect #19017: Wiki PDF Export: <pre> not rendered with monospaced font
https://www.redmine.org/issues/19017?journal_id=67687
2015-12-06T12:39:54Z
Toshi MARUYAMA
<ul></ul><p>Toshi MARUYAMA wrote:</p>
<blockquote>
<p>3.2-stable <a class="changeset" title="Merged r14960 from trunk to 3.2-stable (#19017) pdf: remove italic from DejaVuSansMono. DejaVuS..." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/14962">r14962</a> has completed.</p>
</blockquote>
<p>Sorry, I have committed very minor 3.2-stable <a class="changeset" title="Merged r14963 from trunk to 3.2-stable (#19017) pdf: use all lower cases for DejaVuSansMono." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/14964">r14964</a>.<br />Please release <a class="version" href="https://www.redmine.org/versions/102">3.2.0</a>.</p>
Redmine - Defect #19017: Wiki PDF Export: <pre> not rendered with monospaced font
https://www.redmine.org/issues/19017?journal_id=67692
2015-12-06T14:02:51Z
Jean-Philippe Lang
jp_lang@yahoo.fr
<ul></ul><p>Thanks.</p>