ROOT 가이드

A.2 폰트 바꾸기

폰트 코드
Font code = 10*[Font number] + [Precision]

Font code의 타입은 Font_t 이다. 

Font number

  1. times-medium-i-normal (Times New Roman)
  2. times-bold-r-normal (Times New Roman)
  3. times-bold-i-normal  (Times New Roman)
  4. helvetica-medium-r-normal (Arial)
  5. helvetica-medium-o-normal (Arial)
  6.  helvetica-bold-r-normal (Arial)
  7. helvetica-bold-o-normal (Arial)
  8. courier-medium-r-normal (Courier New)
  9.  courier-medium-o-norma l(Courier New)
  10. courier-bold-r-normal (Courier New)
  11. courier-bold-o-normal (Courier New)
  12. symbol-medium-r-normal (Symbol)
  13. times-medium-r-normal (Times New Roman)
  14. (Wingdings)
  15. Symbol italic - derived from Symbol

Precision

  • precision = 0 fast hardware fonts (steps in the size)
  • precision = 1 scalable and rotatable hardware fonts (see below)
  • precision = 2 scalable and rotatable hardware fonts
  • precision = 3 scalable and rotatable hardware fonts. Text size is given in pixels.

 

바꾸는 법

Font code를 아래와 같이 ft 라 할때 "times-medium-r-normal" 폰트와 Precision = 2 를 사용해보자.

Font_t ft = 132;                 
gStyle -> SetLabelFont (ft,"XY");
gStyle -> SetTitleFont (ft,"XY");
gStyle -> SetLegendFont(ft);
gStyle -> SetStatFont  (ft);

Label과 Title에 넣을 수 있는 두번째 인자는 적용할 축을 의미 한다. 즉, "XY"는 X축과 Y축에 적용함을 의미한다. 

 

참고자료

댓글

댓글 본문
버전 관리
ejungwoo
현재 버전
선택 버전
graphittie 자세히 보기