대개 폰트파일에는 16비트 정수 grid 좌표로 point가 저장되며, grid의 원점은 0,0에서 시작된다. 따라서 -16384 ~ 16383의 범위를 가진다. 원점은 대게 좌하단에 위치함. ( windows의 GDI좌표와는 다름 ).

pixel_size = point_size * resolution / 72

pixel_coord = grid_coord * pixel_size / EM_size
통상 EM size는 2048임 ( 폰트 디자이너가 가상으로 정한 박스크기 )

* 최외곽 윤곽선은 시계방향
* 내부 윤곽선은 반시계방향.

FT_Outline

  typedef struct  FT_Outline_
  {
    short       n_contours;      /* number of contours in glyph        */
    short       n_points;        /* number of points in the glyph      */

    FT_Vector*  points;          /* the outline's points               */
    char*       tags;            /* the points flags                   */
    short*      contours;        /* the contour end points             */

    int         flags;           /* outline masks                      */

  } FT_Outline;



항목
n_contours

윤곽선 갯수.

n_points

총 정점 수.

points

FT_Vector 타입으로 구성된 n_points개의 정점 배열.

tags

n_points개로 된 배열 개별 정점의 타입을 규정. 0번째 비트는 Bézier 제어점인지 아닌지를 나타냄. 제어점이면 1.

1번째 비트는 a third-order Bézier arc control point인지를 나타냄. 이게 off이면 a second-order control point 라는 의미임.

contours

이것는 short형의 n_contous 개의 배열. outline의 각 윤곽선의 마지막 점을 나타냄. 첫번째 윤곽선은 0번째 정점에서 contours[0]번째 정점까지임. 두번째 윤곽선은 contours[0]+1 에서 contours[1]까지.

flags

A set of bit flags used to characterize the outline and give hints to the scan-converter and hinter on how to convert/grid-fit it.  See FT_OUTLINE_FLAGS.


Posted by 바람도리
:
BLOG main image
by 바람도리

공지사항

카테고리

분류 전체보기 (38)
Video Coding (0)
폰트 (1)
DX9 (1)
OpenGL (0)
Lua (0)
회사자료 (13)
스크랩 (7)
장비 (1)
des (3)
서버 (1)
ati (1)

최근에 올라온 글

최근에 달린 댓글

태그목록

글 보관함

달력

«   2025/06   »
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30
Total :
Today : Yesterday :