(我该怎么办?)
如果我在VCL中创建两个标签并设置一个使用Arial和另一个Arial Narrow,我会看到预期的结果。
如果我在Firemonkey中执行相同操作,则第二个标签不会显示在Arial Narrow中。它甚至没有在Arial中显示(我的圆点是圆的,'s'的形状都是错的等等。)
有人知道为什么FM(我用Delphi XE4进行测试)没有正确显示字体吗?我有什么可以做的吗?
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
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
答案 0 :(得分:6)
这似乎只会影响系列中的字体 - 如果字体文件夹中的字体不存在于其自己的系列名称下。例如,Arial Narrow是“Arial”字体文件中的一种字体(它存在于一个家庭中,本身并不是一个家族)。
通常,字体系列仅包含四种样式
Arial (天真地包含)
Arial (实际上包含)
似乎FMX只在任何给定的字体系列中看起来只有一个级别,并且没有查看任何偏离严格的GDI +样式定义的样式变体(Regular,Bold,Italic,Bold Italic)。
通过检查,这也会影响Arial Black - 通过运行fonts文件夹很容易找到其他示例。 Franklin Gothic Demi,Gill Sans Ultra Bold等......任何遵循上述模式的东西。遇到这些字体时,字体似乎会在默认的Segoe UI中呈现。
权宜之计解决方案是使用Arial并将Scale
属性设置为X=0.82
- 它并不完美,但它与Arial Narrow非常接近。
这可能是一个错误,应该是QC'd。