Fonts don't changes with
GlobalUseDirect2D := false;
and all of them are 'Segoe UI'.
What I can do, that fonts can be customizable with GDI+?
Delphi XE4, Firemonkey HD forms.
Fonts don't changes with
GlobalUseDirect2D := false;
and all of them are 'Segoe UI'.
What I can do, that fonts can be customizable with GDI+?
Delphi XE4, Firemonkey HD forms.
谢谢,我修好了。关于这个问题的另一次:我关闭 GlobalUseDirect2D 并且所有文本都将 FontFamily 设置为“Tahoma”,例如,即使它是“Comic Sans MS”。
UPD 这不是完全修复。字体随机播放。
UPD2 现在它是正确的固定。
FMX.Canvas.GDIP.pas 中的修复代码:
procedure TTextLayoutGDIPlus.DoRenderLayout;
var
i: Integer;
LRegion: TRegion;
begin
if not Assigned(FStringFormat) or not Assigned(FGraphics) then
Exit;
FreeAndNil(FGPFont);
if Assigned(LayoutCanvas) then
begin
//FIX BEGIN
TCanvasGdiPlus(LayoutCanvas).Font.Assign(Font);
//FIX END
if not TCanvasGdiPlus(LayoutCanvas).FGPFamily.IsStyleAvailable(vgStyleToGPStyle(Font.Style)) then
begin
FGPFont := TGPFont.Create(TCanvasGdiPlus(LayoutCanvas).FGPFamily,
Font.Size * 0.75 * TCanvasGdiPlus(LayoutCanvas).FFontScale, 0);
if not Assigned(FGPFont) then
FGPFont := TGPFont.Create(TCanvasGdiPlus(LayoutCanvas).FGPFamily,
Font.Size * 0.75 * TCanvasGdiPlus(LayoutCanvas).FFontScale,
vgStyleToGPStyle(Font.Style));
end
else
FGPFont := TGPFont.Create(TCanvasGdiPlus(LayoutCanvas).FGPFamily,
Font.Size * 0.75 * TCanvasGdiPlus(LayoutCanvas).FFontScale,
vgStyleToGPStyle(Font.Style),
UnitPoint);
end