IT한 것

confluence 미리보기에서 한글이 깨질 때

lovian 2021. 4. 7. 14:27

방법 및 절차

1. confluence를 종료

2. ttf 등의 폰트를 설치 또는 복사 (/usr/share/fonts/myfonts 디텍터리에 복사했다고 가정)

3. 설정 값을 setenv.sh, bat에 추가

CATALINA_OPTS="-Dconfluence.document.conversion.fontpath=/usr/share/fonts/myfonts ${CATALINA_OPTS}"
CATALINA_OPTS="-Dconfluence.document.conversion.words.defaultfontname=NanumGothic ${CATALINA_OPTS}"
CATALINA_OPTS="-Dconfluence.document.conversion.slides.defaultfontname.regular=NanumGothic ${CATALINA_OPTS}"
CATALINA_OPTS="-Dconfluence.document.conversion.slides.defaultfontname.asian=NanumGothic ${CATALINA_OPTS}"
CATALINA_OPTS="-Dconfluence.document.conversion.slides.defaultfontname.symbol=NanumGothic ${CATALINA_OPTS}"

export CATALINA_OPTS

 

※ 여기서 약간 중요한게 폰트의 이름을 알아야한다. 리눅스의 경우 fontconfig라는 패키지를 깔고 fc-list 명령으로 설치된 폰트의 정보를 확인 할 수 있는데 그 이름을 넣어줘야한다.

원래 맑은 고딕으로 하려고 했는데 "Malgun Gothic" 이라서 공백을 어떻게 처리해야하나 하다가 나눔고딕을 사용했다.

 

$ fc-list| grep nanum
/usr/share/fonts/truetype/nanum/NanumGothicExtraBold.ttf: 나눔고딕,NanumGothic,NanumGothicExtraBold,나눔고딕 ExtraBold:style=Bold,ExtraBold,Regular
/usr/share/fonts/truetype/nanum/NanumBrush.ttf: 나눔손글씨 붓,Nanum Brush Script:style=Regular
/usr/share/fonts/truetype/nanum/NanumGothic.ttf: 나눔고딕,NanumGothic:style=Regular
/usr/share/fonts/truetype/nanum/NanumPen.ttf: 나눔손글씨 펜,Nanum Pen Script:style=Regular
/usr/share/fonts/truetype/nanum/NanumGothicBold.ttf: 나눔고딕,NanumGothic:style=Bold
/usr/share/fonts/truetype/nanum/NanumMyeongjoExtraBold.ttf: 나눔명조,NanumMyeongjo,NanumMyeongjoExtraBold,나눔명조 ExtraBold:style=ExtraBold,Regular
/usr/share/fonts/truetype/nanum/NanumMyeongjo.ttf: 나눔명조,NanumMyeongjo:style=Regular
/usr/share/fonts/truetype/nanum/NanumMyeongjoBold.ttf: 나눔명조,NanumMyeongjo:style=Bold

 

4. 캐시 파일제거 (이 과정을 누락시켜서 삽질 많이함)

  • <confluence_home>/viewfile/
  • <confluence_home>/thumbnails/
  • <confluence_home>/shared-home/dcl-document/
  • <confluence_home>/shared-home/dcl-document_hd/
  • <confluence_home>/shared-home/dcl-thumbnail/

5. confluence 시작

 

 

참조

설정 할 속성 표

confluence.atlassian.com/doc/recognized-system-properties-190430.html

 

설정할 속성이름과 의미

confluence.document.conversion.fontpath
5.8.7  

Set this property to define a directory where you can add additional fonts to be used when rendering files (in previews and thumbnails).

This is useful if you need to support previewing files with specific fonts, or fonts with multibtye characters (such as Japanese).

폰트를 탐색할 디렉터리를 지정

confluence.document.conversion.words.defaultfontname
5.8.7  

Set this property to change the default font for rendering Word ( .doc and .docx ) files in Confluence.

Specify just the name of the font  (not the path) .

워드 문서에서 사용할 기본 폰트 이름을 지정

confluence.document.conversion.slides.defaultfontname.regular
5.8.7  

Set this property to change the default font for rendering regular fonts in Powerpoint ( .ppt and .pptx ) files in Confluence.

Specify just the name of the font (not the path) .

PPT, PPTX에서 사용할 기본 폰트 이름을 지정

confluence.document.conversion.slides.defaultfontname.asian
5.8.7 TakaoPGothic

Set this property to change the default font for rendering asian fonts in Powerpoint ( .ppt and .pptx ) files in Confluence.

Specify just the name of the font  (not the path) .

PPT, PPTX에서 사용할 아시안 기본 폰트이름을 지정 (한국어, 일본어 등등을 의미하는 듯)

confluence.document.conversion.slides.defaultfontname.symbol
5.8.7  

Set this property to change the default font for rendering symbols in Powerpoint ( .ppt and .pptx ) files in Confluence.

This is the font that will be used for bullets and other symbols when the font Symbol is not found.

Specify just the name of the font  (not the path) .

PPT, PPTX에서 사용할 기본 기호 폰트 이름을 지정 (특수 기호를 말하는 듯)

 

참고 원본

confluence.atlassian.com/confkb/the-text-in-a-powerpoint-excel-or-word-document-is-missing-or-looks-different-via-confluence-view-file-macro-200213562.html

 

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}"
  • 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.
    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