본문 바로가기

순이코딩/기타

[폰트변경]Jupyter Notebook 폰트 변경 방법

728x90
반응형

 


 

이번엔 Jupyter Notebook에서 폰트를 변경하는 방법을 알아보겠습니다.

 

 

■ 폰트 설치하기

 

당연히 폰트는 설치하고 오셨겠죠? 바로 다음 단계로 넘어가겠습니다.

 

 

■ 경로 확인

 

먼저 C:\Users\{사용자} 폴더에. jupyter 폴더가 있는지 확인해 주세요.

 

저는 있습니다.

 

만약 없으신 분들은 실행창을 켠 후 명령 프롬프트 창을 실행해 주세요.

Win + r을 눌러 실행창을 켤 수 있고 명령 프롬프트 창은 cmd를 실행하시면 됩니다.

그리고 jupyter notebook --generate-config를 입력해 주시면 됩니다.

 

 

■ custom

 

 

이제. jupyter 폴더로 들어가 custom폴더를 생성해 줍니다.

 

그리고 그 안에 custom.css 파일을 생성하면 됩니다.

저는 VSCode에서 작성하겠습니다.

 

.container { width:95% !important; }

div.CodeMirror,

div.CodeMirror pre { /*코드 블록*/
font-family: 'IntelOne Mono Medium', D2Coding;
font-size: 13pt;
line-height: 150%;
}

.text_cell_render { /*마크다운*/
font-family: 'IntelOne Mono Medium', D2Coding;
}

.input_prompt { /*줄번호*/
font-family: 'IntelOne Mono Medium', D2Coding;
}

.output_result pre { /*출력결과-맨마지막 출력*/
font-family: 'IntelOne Mono Medium', D2Coding;
}

.output_stdout pre { /*출력결과-긴출력, 중간출력*/
font-family: 'IntelOne Mono Medium', D2Coding;
}

.output_area { /*표*/
font-family: 'IntelOne Mono Medium', D2Coding;
}

.CodeMirror-dialog, .CodeMirror-dialog .CodeMirror-search-field, .terminal-app .terminal {
font-family: 'IntelOne Mono Medium', D2Coding;
}

 

그리고 jupyter notebook을 실행하면 폰트가 변경된 모습을 볼 수 있습니다.

 

728x90
반응형