(Và tôi có thể làm gì với nó?)Tại sao phông chữ đậm đặc không được hiển thị đúng trong FireMonkey?
Nếu tôi tạo hai nhãn trong VCL và đặt một nhãn để sử dụng Arial và Arial Narrow khác, tôi sẽ thấy kết quả mong đợi.
Nếu tôi làm như vậy trong Firemonkey là nhãn thứ hai không được hiển thị trong Arial Narrow. Nó thậm chí không được hiển thị trong Arial (dấu chấm trên của tôi là tròn, hình dạng của 's' là tất cả sai vv).
Có ai biết tại sao FM (Tôi đã thử nghiệm này với Delphi XE4) không hiển thị font chữ đúng? Tôi có thể làm được gì không?
Nguồn cho các hình thức VCL:
object Form3: TForm3
Left = 0
Top = 0
Caption = 'Form3'
ClientHeight = 198
ClientWidth = 475
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
OldCreateOrder = False
PixelsPerInch = 96
TextHeight = 13
object Label1: TLabel
Left = 24
Top = 32
Width = 134
Height = 14
Caption = 'This label is using Arial @11'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Arial'
Font.Style = []
ParentFont = False
end
object Label2: TLabel
Left = 24
Top = 52
Width = 152
Height = 15
Caption = 'This label is using Arial Narrow @11'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Arial Narrow'
Font.Style = []
ParentFont = False
end
object Label3: TLabel
Left = 24
Top = 98
Width = 398
Height = 36
Caption = 'This label is using Arial @32'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -32
Font.Name = 'Arial'
Font.Style = []
ParentFont = False
end
object Label4: TLabel
Left = 24
Top = 140
Width = 429
Height = 37
Caption = 'This label is using Arial Narrow @32'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -32
Font.Name = 'Arial Narrow'
Font.Style = []
ParentFont = False
end
end
Nguồn cho các hình thức FM:
object Form4: TForm4
Left = 0
Top = 0
Caption = 'Form4'
ClientHeight = 207
ClientWidth = 558
FormFactor.Width = 320
FormFactor.Height = 480
FormFactor.Devices = [dkDesktop, dkiPhone, dkiPad]
DesignerMobile = False
DesignerWidth = 0
DesignerHeight = 0
DesignerDeviceName = ''
DesignerOrientation = 0
object Label1: TLabel
Font.Family = 'Arial'
StyledSettings = [ssSize, ssStyle, ssFontColor]
Height = 17.000000000000000000
Position.X = 16.000000000000000000
Position.Y = 32.000000000000000000
Text = 'This label is using Arial @11'
Width = 225.000000000000000000
end
object Label2: TLabel
Font.Family = 'Arial Narrow'
StyledSettings = [ssSize, ssStyle, ssFontColor]
Height = 17.000000000000000000
Position.X = 16.000000000000000000
Position.Y = 48.000000000000000000
Text = 'This label is using Arial Narrow @11'
Width = 225.000000000000000000
end
object Label3: TLabel
Font.Family = 'Arial'
Font.Size = 32.000000000000000000
StyledSettings = [ssStyle, ssFontColor]
Height = 41.000000000000000000
Position.X = 16.000000000000000000
Position.Y = 104.000000000000000000
Text = 'This label is using Arial @32'
Width = 433.000000000000000000
end
object Label4: TLabel
Font.Family = 'Arial Narrow'
Font.Size = 32.000000000000000000
StyledSettings = [ssStyle, ssFontColor]
Height = 65.000000000000000000
Position.X = 16.000000000000000000
Position.Y = 128.000000000000000000
Text = 'This label is using Arial Narrow @32'
Width = 545.000000000000000000
end
end
Định nghĩa của bạn về "đúng" là gì? Tại sao bạn khẳng định rằng VCL là thích hợp, và FMX thì không? –
Arial Narrow không phải là phông chữ mặc định của Windows. Nó được cài đặt thông qua bộ Windows Office. Bạn đã cố gắng sao chép vấn đề này qua bất kỳ phông chữ nào khác không? Bạn đã cố tái tạo sự cố này trên máy tính khác chưa? Với cửa sổ, rất nhiều ảnh hưởng đến cách phông chữ được hiển thị. – Peter
@DavidHeffernan: Bởi vì, như tôi đã chỉ ra, biểu diễn FM rõ ràng không phải là phông chữ từ gia đình Arial. – gabr