carpedm20 / multi-speaker-tacotron-tensorflow

Multi-speaker Tacotron in TensorFlow.
http://carpedm20.github.io/tacotron
Other
631 stars 342 forks source link

[window10] 그래프 한글이 깨어지네요. #13

Open escort94 opened 6 years ago

escort94 commented 6 years ago

test-step-000005000-align001

그림과 같이 윈도10에서 한글이 깨어지네요. ubuntu에서는 한글정상적이었는데

한글인코딩 어떻게 설정해줘야 하나요?

engiecat commented 6 years ago

나눔고딕 설치해야지 작동하더라고요. 윈도우에서는 바로 되기는 했었는데...

escort94 commented 6 years ago

D2Coding 폰트설치 후 \utils\plot.py matplotlib.rc('font', family="D2Coding") 변경해서 하니 한글 정상 출력되군요. 저 window에서 나눔글꼴이 이상하군요.

escort94 commented 6 years ago

train-step-000002000-align000 한글은 잘 나오네요.

k-enzy commented 6 years ago

저도 안됐다가 폰트 명시적으로 적용했습니다.

utils/plot.py 에 font_name = font_manager.FontProperties(fname="c:/Windows/Fonts/malgun.ttf").get_name() rc('font', family=font_name) #matplotlib.rc('font', family="NanumBarunGothic")

위 코드 추가하여 해결하였습니다.

tucan9389 commented 6 years ago

맥에서는 아래처럼 하니 됐습니다.

1. 나눔고딕 폰트(NanumGothic.ttf) 다운받아서 utils 폴더안에 넣기

2018-05-14 4 03 36

2. 나눔고딕 폰트 설치

그냥 파인더에서 나눔고딕 폰트 실행하면 됩니다.

3. 설치 후 폰트메니저 재빌드(최초 1회만)

matplotlib.font_manager._rebuild()

4. 폰트 이름 명시적으로 가져와서 호출

utils/plot.py 수정

# matplotlib.rc('font', family="NanumBarunGothic")
font_fname = './utils/NanumGothic.ttf'
font_name = font_manager.FontProperties(fname=font_fname).get_name()
rc('font', family=font_name)

참고:

GeniousM commented 6 years ago

@tucan9389 3번 폰트매니저 재빌드 부터 안되는데 뭐가 문제일까요..? 4번 실행해도 NameError: name 'font_manager' is not defined 뜨고 안되네요 ㅠㅠ

yhsang2 commented 5 years ago

C:\Users\사용자이름.matplotlib 안의 폴더&파일을 지우고 아래와 같이 해주면 됩니다. .matplotlib안에 fontList.json라는 파일이 있는데 캐시라고 하네요.

import matplotlib import matplotlib.font_manager as fm

matplotlib.use('Agg')

matplotlib.rc('font', family="D2Coding")

font_location = 'C:/Windows/Fonts/NanumBarunGothic.ttf' # ex - 또는 ./utils/NanumBarunGothic.ttf font_name = fm.FontProperties(fname = font_location).get_name() matplotlib.rc('font', family = font_name)

june-yoon commented 5 years ago

@yhsang2 감사합니다 지우니까 드디어 되네요 덕분에 해결했습니다 ㅠㅠ