Delphi/꿀팁
넓이에 맞춰 FontSize 자동계산 하기 - 2
2019/02/14 - [ - Delphi] - 크기에 맞춰 FontSize 자동계산 하기 - 1 간단하게 예제로 Label의 넓이에 맞춰 FontSize를 조절해 보겠습니다.function CalcFontSize(obj : TLabel; nWidth, nHeight : Integer; sText : string): Integer;Const MAX_FONT_SIZE = 32; MIN_FONT_SIZE = 2; var ARect : TRect; I : Integer;begin ARect := Default(TRect); ARect.Right := nWidth; ARect.Bottom := nHeight; for I := MIN_FONT_SIZE to MAX_FONT_SIZE do begin (obj as ..