#ifndef _LGFX_TEXT_H_
#define _LGFX_TEXT_H_

#pragma once
#include <stdint.h>
#include "lgfxfont.h" // 이미 여기서 FontProperties와 DrawMode_t가 정의됩니다.

#ifdef __cplusplus
extern "C" {
#endif

// 추가적인 구조체 정의 없이 lgfxfont.h의 정의를 그대로 사용합니다.

// 텍스트 출력 함수 (인자 8개 버전)
void lgfx_writeln(const LGFXfont *font,
                  const char *string,
                  int32_t *cursor_x,
                  int32_t *cursor_y,
                  uint8_t *framebuffer,
                  int32_t fb_width,
                  int32_t fb_height,
                  uint8_t color);

// 텍스트 경계 계산 함수 (인자 9개 버전)
void lgfx_get_text_bounds(const LGFXfont *font,
                          const char *string,
                          int32_t *x,
                          int32_t *y,
                          int32_t *x1,
                          int32_t *y1,
                          int32_t *w,
                          int32_t *h,
                          const FontProperties *properties);

// 기타 필요한 함수들 (c파일에 구현되어 있는 경우 선언 추가)
void lgfx_get_glyph(const LGFXfont *font, uint32_t code_point, LGFXglyph **glyph);

#ifdef __cplusplus
}
#endif

#endif // _LGFX_TEXT_H_