能不能自己Create一个Font赋给打印机的Canvas?
你可以试试
完整源码在DDG5的第8章的MakeFont:
procedure TMainForm.MakeFont;
begin
// Clear the contents of FLogFont
FillChar(FLogFont, sizeof(TLogFont), 0);
// Set the TLOGFONT's fields
with FLogFontdo
begin
lfHeight := StrToInt(seHeight.Text);
lfWidth := StrToInt(seWidth.Text);
lfEscapement := StrToInt(cbEscapement.Items[cbEscapement.ItemIndex]);
lfOrientation := StrToInt(cbOrientation.Items[cbOrientation.ItemIndex]);
lfWeight := WeightArray[cbWeight.ItemIndex];
lfItalic := ord(cbxItalic.Checked);
lfUnderline := ord(cbxUnderLine.Checked);
lfStrikeOut := ord(cbxStrikeOut.Checked);
lfCharSet := CharSetArray[cbCharset.ItemIndex];
lfOutPrecision := OutPrecArray[cbOutPrec.ItemIndex];
lfClipPrecision := ClipPrecArray[cbClipPrec.ItemIndex];
lfQuality := QualityArray[rgQuality.ItemIndex];
lfPitchAndFamily := PitchArray[rgPitch.ItemIndex] or FamilyArray[cbFamily.ItemIndex];
StrPCopy(lfFaceName, cbFontFace.Items[cbFontFace.ItemIndex]);
end;
// Retrieve the requested font
FHFont := CreateFontIndirect(FLogFont);
// Assign to the Font.Handle
pbxFont.Font.Handle := FHFont;
pbxFont.Refresh;
end;