The text in a PowerPoint, Excel or Word Document is missing or looks different via Confluence View File macro

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Fisheye および Crucible は除く

Before following this guide, check if you are using a Java version that is affected by this bug:

If that is the case, proceed with the workaround on the bug before checking for font issues.

要約

The View File macros allow you to embed an Office or PDF document on a page. However, after an installation, upgrade, or migration to a different OS, the files are displaying incorrectly or not showing at all.

環境

  • Confluence Server and Data Center.
  • Supported OS.

診断

When using the view file macro, the text is missing or appears different than when viewing the document in its native application.

Viewed in MS PowerPointViewed in Confluence

Text, background, and image are all shown.

Background and image are shown, but the text is missing.


This error may also be seen in atlassian-confluence.log

2017-09-21 15:56:37,697 WARN [Caesium-1-2] [apache.fontbox.util.FontManager] findTTFontname Font not found: Arial,BoldItalic


This can also happen with non-English characters, like Chinese, which doesn't display properly or appear as boxes.

原因

Custom fonts or Microsoft-specific fonts (for example Arial, Times New Roman, or Courier New) may not exist if you are running Confluence and the Office Connector on a non-Windows server. When previewing, a substitute font will be used to render the text.

Similarly, to display non-English Characters like Chinese, the system will need the required fonts.

注意

Make sure that the document is using the correct fonts. For example, the msttcorefonts package does not include Wingdings but one called Webdings. In Windows this will fallback correctly, but not with Confluence. This also occurs for fonts such as Helvetica. Use Arial in the document instead. Also if there are any reservations installing the msttcorefonts package, you may opt for something like Liberation(tm) Fonts (this font family aims at metric compatibility with Arial, Times New Roman, and Courier New. It is sponsored by Red Hat)

ソリューション

Linux

  1. Confluence をシャットダウンします。
  2. Install the missing fonts onto your server on Linux (see below)
  3. Set the system property confluence.document.conversion.fontpath in setenv.sh (see Configuring System Properties) to
      • /usr/share/fonts/truetype/msttcorefonts for Ubuntu/Debian


        CATALINA_OPTS="-Dconfluence.document.conversion.fontpath=/usr/share/fonts/truetype/msttcorefonts ${CATALINA_OPTS}"



        CATALINA_OPTS="-Dconfluence.document.conversion.fontpath=<absolute path to font location> ${CATALINA_OPTS}"
      • /usr/share/fonts/msttcore for Centos/RedHaT

        CATALINA_OPTS="-Dconfluence.document.conversion.fontpath=/usr/share/fonts/msttcore ${CATALINA_OPTS}"
        CATALINA_OPTS="-Dconfluence.document.conversion.fontpath=<absolute path to font location> ${CATALINA_OPTS}"
  4. If you have any custom, non-Microsoft fonts in your document, the font files must be copied to the same path outlined in the previous step.
  5. 次のコマンドを利用してフォントのキャッシュを再構築します。

    fc-cache -f -v 
  6. Confirm that your font is listed in the font cache: 

    fc-list
  7. Follow the steps in How to rebuild the file preview cache from scratch in Confluence to delete previous preview with incorrect fonts.
  8. (Optional) Clear the Confluence Plugins Cache.
  9. (Optional) Perform a Content Index Rebuild.
  10. Confluence を再起動します。

Installing Microsoft Fonts

  • For Debian/Ubuntu (see RestrictedFormats/Microsoft_Fonts)

    sudo apt-get install ttf-mscorefonts-installer
  • For RedHat/Centos (see Get Microsoft's Core Fonts for the Web and Cleartype Fonts)

    yum install curl cabextract xorg-x11-font-utils fontconfig
    rpm -i https://downloads.sourceforge.net/project/mscorefonts2/rpms/msttcore-fonts-installer-2.6-1.noarch.rpm

    (info) If you're running RHEL 7 / EC2 AMI on AWS and the server can't find the package crabextract, you may need to update the epel-release first:

    yum install epel-release
    yum install ./epel-release-latest-*noarch.rpm
  • Webcore package (RedHat/Centos) - this package contains the Wingdings font, as well as other Microsoft fonts. It could be an alternative in case the msttcore package doesn't contain all the fonts you need.

    yum localinstall http://li.nux.ro/download/nux/dextop/el7/x86_64/webcore-fonts-3.0-1.noarch.rpm
  • If you choose to use the WebCore package, make sure to update the JVM parameter to the following:

    /usr/share/fonts/webcore for Centos/RedHat

    CATALINA_OPTS="-Dconfluence.document.conversion.fontpath=/usr/share/fonts/webcore ${CATALINA_OPTS}"

Installing Non-English Fonts

  1. Identify which fonts are being used in the Word Document. For example, in the case of Chinese Fonts, MingLiU is one famous font. 
    1. It is important that all Chinese characters are using some kind of font, so Confluence can look for relevant files.
  2. Download the font and place it under the relevant path. In CentOS/RHEL, it will be as discussed above.
  3. Use that font in the system property confluence.document.conversion.fontpath in setenv.sh

    CATALINA_OPTS="-Dconfluence.document.conversion.fontpath=/usr/share/fonts/MingLiU ${CATALINA_OPTS}"

(info) A generic font for Chinese is wqy-zenhei, this can also be used, in case it is unsure that what fonts are being used in the document.
(info) For Korean Text, if the font Batang isn't displaying properly, it can be replaced by Malgun Gothic, a font commonly used in Microsoft PowerPoint/Word
(info) For Japanese Text, a generic font would be IPA Gothic so this font family can be installed to help displaying Japanese Text

(info)  For broken bullet points in Power point files have a look at  CONFSERVER-52254 - Getting issue details... STATUS

Windows

  • Copy any missing fonts to %windir%\fonts this is usually c:\windows\fonts.
tip/resting Created with Sketch.

When copying fonts from a computer running Windows, the font files will typically be located in c:\windows\fonts. You can also download the Microsoft Core fonts from sourceforge.


最終更新日 2023 年 7 月 28 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.