Nov 4, 2014 Replies: 21 In order to add custom font files to your application you need to follow these instructions: 1. Add the font file to the "special" folder: <project>\Files\Special 2. Add the #AppFont attribute for each font file (including the extension): Code: #AppFont: papercuts-2.ttf #AppFont: vermidirouge 1.0.ttf 3. Find the font name. You can double click on the font file: 4. Create a new font with this font name. The name should not include spaces: Code: Label1.Font = Font.CreateNew2("VermidiRouge", 30) Label2.Font = Font.CreateNew2("PaperCuts2", 20) Note that #AppFont and the special folder features are not available in the current beta. Attachments CustomFonts.zip CustomFonts.zip 54.9 KB · Views: 1,827 Click to expand...
In order to add custom font files to your application you need to follow these instructions: 1. Add the font file to the "special" folder: <project>\Files\Special 2. Add the #AppFont attribute for each font file (including the extension): Code: #AppFont: papercuts-2.ttf #AppFont: vermidirouge 1.0.ttf 3. Find the font name. You can double click on the font file: 4. Create a new font with this font name. The name should not include spaces: Code: Label1.Font = Font.CreateNew2("VermidiRouge", 30) Label2.Font = Font.CreateNew2("PaperCuts2", 20) Note that #AppFont and the special folder features are not available in the current beta.
G GiulioVale Active Member Licensed User Longtime User Nov 4, 2014 #2 HI Erel, with this example I have Error occurred on line: 30 (main) Object was not initialized (UIFont) Any help? edit: ooooppss my fault I not read the message for the current beta. Sorry Last edited: Nov 4, 2014
HI Erel, with this example I have Error occurred on line: 30 (main) Object was not initialized (UIFont) Any help? edit: ooooppss my fault I not read the message for the current beta. Sorry
G GiulioVale Active Member Licensed User Longtime User Nov 26, 2014 #3 HI Erel, with btnSeguente.CustomLabel.Font = Font.CreateNew2("FontAwesome", 20) i want assign a font to a text button. My text is UnescapeUnicode("\uf061") How i can assign at runtime this char to button label?
HI Erel, with btnSeguente.CustomLabel.Font = Font.CreateNew2("FontAwesome", 20) i want assign a font to a text button. My text is UnescapeUnicode("\uf061") How i can assign at runtime this char to button label?
Erel B4X founder Staff member Licensed User Longtime User Nov 26, 2014 #4 Code: btn.Text = chr(0xf061)
S susu Well-Known Member Licensed User Longtime User Dec 11, 2014 #5 Your app runs on iPhone 5S (iOS 7.1.2) but there's no change of font? Is it a bug?
Erel B4X founder Staff member Licensed User Longtime User Dec 11, 2014 #6 I've just tested it on an iOS 7 device and I do see the fonts. Are you running the example as is?
S susu Well-Known Member Licensed User Longtime User Dec 11, 2014 #7 Yes, I just download your code and run as "Debug".
Erel B4X founder Staff member Licensed User Longtime User Dec 11, 2014 #8 Which version of B4i are you using?
S susu Well-Known Member Licensed User Longtime User Dec 11, 2014 #10 Erel said: Which version of B4i are you using? Click to expand... B4i 1.21
Erel B4X founder Staff member Licensed User Longtime User Dec 12, 2014 #11 Not sure why it doesn't appear on your device. I tested it on iPad running iOS 7. Have you tried to run it in Release mode?
Not sure why it doesn't appear on your device. I tested it on iPad running iOS 7. Have you tried to run it in Release mode?
Erel B4X founder Staff member Licensed User Longtime User Jan 19, 2015 #13 Yes: Code: Button1.CustomLabel.Font = Font.CreateNew2("PaperCuts2", 20)
omidaghakhani1368 Well-Known Member Licensed User Longtime User Feb 22, 2015 #14 Hi. I use custom font and it's work good but still cannot change fontsize. of course sometime i get error "The file 'J:\Basic4x\Basic4iOS\Chapter 18\Attachment\Project\Objects\src\tahoma' already exists." what it is? How change font size? (I use label1.Font = Font.CreateNew(30))
Hi. I use custom font and it's work good but still cannot change fontsize. of course sometime i get error "The file 'J:\Basic4x\Basic4iOS\Chapter 18\Attachment\Project\Objects\src\tahoma' already exists." what it is? How change font size? (I use label1.Font = Font.CreateNew(30))
Erel B4X founder Staff member Licensed User Longtime User Feb 22, 2015 #15 The size is set when you call Font.Create2. See the example in the first post.
omidaghakhani1368 Well-Known Member Licensed User Longtime User Feb 22, 2015 #16 Erel said: The size is set when you call Font.Create2. See the example in the first post. Click to expand... I use Font.Create2 but not work even i set size in 40 but not change.
Erel said: The size is set when you call Font.Create2. See the example in the first post. Click to expand... I use Font.Create2 but not work even i set size in 40 but not change.
Erel B4X founder Staff member Licensed User Longtime User Feb 22, 2015 #17 It is probably the designer that changes your font size. Set the font size in the designer.
omidaghakhani1368 Well-Known Member Licensed User Longtime User Feb 22, 2015 #18 I try change font size from settings.I dont want to change font size in designer.Is there a way?
stari Active Member Licensed User Longtime User Feb 22, 2015 #19 omidaghakhani1368 said: I try change font size from settings.I dont want to change font size in designer.Is there a way? Click to expand... see Replay #15
omidaghakhani1368 said: I try change font size from settings.I dont want to change font size in designer.Is there a way? Click to expand... see Replay #15
Erel B4X founder Staff member Licensed User Longtime User Feb 22, 2015 #20 Yes. You can either change the font size in Page_Resize event or set the "Handle Resize Event" property to false.
Yes. You can either change the font size in Page_Resize event or set the "Handle Resize Event" property to false.