Fonts Firemonkey应用程序:TMemo中的monospace字体?
是否可以在Firemonkey(使用Delphi 10.2 Tokyo开发)应用程序的TMemo中设置/使用单空格字体 我们尝试:Fonts Firemonkey应用程序:TMemo中的monospace字体?,fonts,firemonkey,delphi-xe,Fonts,Firemonkey,Delphi Xe,是否可以在Firemonkey(使用Delphi 10.2 Tokyo开发)应用程序的TMemo中设置/使用单空格字体 我们尝试: TextSettings.Font.Family := 'Courier New'; TextSettings.Font.Family := 'Courier'; TextSettings.Font.Family := 'Monospace'; 但是,当我们在Android中运行应用程序时,文本字体不是monospace。首先,不要使用Delphi T
TextSettings.Font.Family := 'Courier New';
TextSettings.Font.Family := 'Courier';
TextSettings.Font.Family := 'Monospace';
但是,当我们在Android中运行应用程序时,文本字体不是monospace。首先,不要使用Delphi Tokyo为Android做任何应用程序,它还不起作用,你的应用程序会非常慢!您必须等待更新 这是android上所有可用的字体:
// +---------------------------------------------------------------+
// ¦ ¦ FONT FAMILY ¦ TTF FILE ¦
// ¦----+----------------------------+-----------------------------¦
// ¦ 1 ¦ casual ¦ ComingSoon.ttf ¦
// ¦ 2 ¦ cursive ¦ DancingScript-Regular.ttf ¦
// ¦ 3 ¦ monospace ¦ DroidSansMono.ttf ¦
// ¦ 4 ¦ sans-serif ¦ Roboto-Regular.ttf ¦ Roboto-Regular.ttf / Roboto-Bold.ttf / Roboto-BoldItalic.ttf / Roboto-Italic.ttf
// ¦ 5 ¦ sans-serif-black ¦ Roboto-Black.ttf ¦ Roboto-Black.ttf / Roboto-BlackItalic.ttf
// ¦ 6 ¦ sans-serif-condensed ¦ RobotoCondensed-Regular.ttf ¦ RobotoCondensed-Regular.ttf / RobotoCondensed-Bold.ttf / RobotoCondensed-BoldItalic.ttf / RobotoCondensed-Italic.ttf
// ¦ 7 ¦ sans-serif-condensed-light ¦ RobotoCondensed-Light.ttf ¦ RobotoCondensed-Light.ttf / RobotoCondensed-LightItalic.ttf
// ¦ 8 ¦ sans-serif-light ¦ Roboto-Light.ttf ¦ Roboto-Light.ttf / Roboto-LightItalic.ttf
// ¦ 9 ¦ sans-serif-medium ¦ Roboto-Medium.ttf ¦ Roboto-Medium.ttf / Roboto-MediumItalic.ttf
// ¦ 10 ¦ sans-serif-smallcaps ¦ CarroisGothicSC-Regular.ttf ¦
// ¦ 11 ¦ sans-serif-thin ¦ Roboto-Thin.ttf ¦ Roboto-Thin.ttf / Roboto-ThinItalic.ttf
// ¦ 12 ¦ serif ¦ NotoSerif-Regular.ttf ¦
// ¦ 13 ¦ serif-monospace ¦ CutiveMono.ttf ¦
// +---------------------------------------------------------------+
因此,请尝试serif monospace我通过以下方式解决了这个问题:
{$IFDEF MSWINDOWS}
Memo1.TextSettings.Font.Family := 'Courier New';
Memo1.StyledSettings := Memo1.StyledSettings - [TStyledSetting.Family]
{$ENDIF}
{$IFDEF ANDROID}
Memo1.TextSettings.Font.Family := 'monospace';
Memo1.StyledSettings := Memo1.StyledSettings - [TStyledSetting.Family]
{$ENDIF}
非常感谢。但我用另一种方式解决了这个问题(见我的答案)。你认为东京德尔福10.2比柏林德尔福10.1慢得多吗?是的,请看这里:。。。别忘了投票:)