; _______________________________________________________________________________________
;|                                                                                       |
;| ..::FreshLib::..  Free, open source. Licensed under "BSD 2-clause" license."          |
;|_______________________________________________________________________________________|
;
;  Description: Fonts managing library.
;
;  Target OS: Any
;
;  Dependencies:
;
;  Notes: This file contains OS independent part of the library and includes respective
;         OS dependent files.
;_________________________________________________________________________________________
module "Fonts library"

ffItalic    = 1
ffUnderline = 2
ffStrikeOut = 4

ffMonospaced = $80


fwLight     = 0
fwDemilight = 1
fwNormal    = 2
fwMedium    = 3
fwDemibold  = 4
fwBold      = 5
fwExtraBold = 6
fwBlack     = 7



struct __TFont
  .hFontFace      dd ?    ; The name of the font face.
  .height         dd ?    ; The character height in pixels.
  .weight         dd ?    ; The weight of the characters.
  .flags          dd ?    ; ffItalic, ffMonospaced, etc.
ends


interface FontCreate, .font_name, .size, .weight, .flags

interface FontDestroy, .pFont


; returns some font metrics
;
; Arguments:
;    .font - the font
; Returns:
;    EAX - the line height of the font.
;    EBX - the ascender of the font.
;    EDX - the descender of the font.

interface GetFontMetrics, .font



include '%TargetOS%/fonts.asm'

endmodule