Project

General

Profile

Actions

Defect #20372

closed

Contents inside <pre> are not rendered as monospace font in Chrome for Mac

Added by Go MAEDA over 9 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Normal
Category:
UI
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

Although contents inside pre elements are expected to be rendered as monospace font, but san-serif fonts are used for them when accessing Redmine with Chrome for Mac.

This can be fixed by setting CSS font-family.

current trunk:
A proportional font is used to show source code. 4 spaces indentation looks like 2 or 3 spaces. Undesirable.

screenshot (current trunk)

with the patch:

Source code should be rendered like this.

screenshot (with the patch)

This patch adds the following line to the stylesheet.

pre, code {font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace;}

This covers many operating systems.

  • Consolas: included with windows
  • Menlo: included with Mac and iOS
  • Liberation Mono: included with Ubuntu

Files

without-patch.png (41 KB) without-patch.png screenshot (current trunk) Go MAEDA, 2015-07-20 01:10
with-patch.png (34.6 KB) with-patch.png screenshot (with the patch) Go MAEDA, 2015-07-20 01:10
chrome-mac-monospace-font-fix.diff (477 Bytes) chrome-mac-monospace-font-fix.diff patch Go MAEDA, 2015-07-20 01:24

Related issues

Related to Redmine - Defect #20407: Monospace font-family values are differ between application.css and scm.cssClosedJean-Philippe Lang

Actions
Related to Redmine - Defect #32170: Text enclosed in pre tag in Wiki formatting reference is not displayed in monospaced font in ChromeClosedGo MAEDA

Actions
Actions #1

Updated by Go MAEDA over 9 years ago

  • Description updated (diff)
  • Target version set to 3.1.0

Let's include this fix in the next release.

Actions #2

Updated by Jean-Philippe Lang over 9 years ago

  • Status changed from New to Closed
  • Assignee set to Jean-Philippe Lang
  • Resolution set to Fixed

Patch committed, thanks.

Actions #3

Updated by Go MAEDA over 9 years ago

Thanks for merging!

Actions #4

Updated by Go MAEDA over 9 years ago

  • Related to Defect #20407: Monospace font-family values are differ between application.css and scm.css added
Actions #5

Updated by Go MAEDA about 5 years ago

  • Related to Defect #32170: Text enclosed in pre tag in Wiki formatting reference is not displayed in monospaced font in Chrome added
Actions

Also available in: Atom PDF