FAQ TBarCode DLL / TBarCode Library
Modificare lo stile del font del codice a barre in Delphi
Modificare lo stile del font del codice a barre in Delphi
Create una struttura LOGFONT e impostatela con la funzione BCSetLogFont.
Function BCSetLogFont ( const pBarCode:t_BarCode; // IN : Ptr To Barcode-Definition lf:LOGFONT // IN : TLogFont (TFont) structure ):TErrCode; external 'TBarCode8.dll';
Ecco un esempio di struttura LOGFONT. Per regolare la dimensione del font, dovete modificare il parametro lfHeight nella struttura.
var
lf:TLogFont;
begin
lf.lfHeight := 24; {char height in pixels }
lf.lfWidth := 12; {char width in pixels }
lf.lfEscapement := 0; {orientation of next char }
lf.lfOrientation := 0; {orientation of first char}
lf.lfWeight := FW_NORMAL; {normal thickness }
lf.lfItalic := 0; {not italic characters }
lf.lfUnderline := 0; {not underlined characters}
lf.lfStrikeOut := 0; {not strikeout characters }
lf.lfCharSet := OEM_CHARSET;{OEM character set }
lf.lfOutPrecision := 0; {default output precision }
lf.lfClipPrecision := 0; {default clipping precision}
lf.lfQuality := DEFAULT_QUALITY; {default scaling quality}
lf.lfPitchAndFamily := FF_SCRIPT;{default pitch,
script font family }
lstrcpy(lf.lfFaceName,'Arial'+chr(0)); {script typeface}
Per maggiori informazioni su LOGFONT visitate http://msdn.microsoft.com/en-us/library/ms533931(VS.85).aspx