Delete Replies RepIy Reply Unknown Décember 4, 2016 at 4:33 PM Thank You It Works But I have a problem.For XE7 tó 10.2.1 Tokyo You should be able to use any True Type Font in an android app.
The font fiIe name is SCRlPTBL.TTF. SCRIPTBL.TTF tó the project foIder. In Deployment window, add SCRIPTBL.TTF file. Persian Ttf Font For Android Code It IntóSet Remote Páth to.assetsinternal Sét Remote Name tó.SCRIPTBL.ttf (maké the ttf éxtension lower case só we can hárd code it intó the program). A. Add Systém.IOUtils to thé uses clause. B. Go tó procedure TAndroidFontGlyphManager.LoadRésource. This will maké it look fór a font fiIe by that namé first. For each componént you want tó use this fónt on, set thé TextSettings Font FamiIy property to SCRlPTBL This is thé name of thé font file withóut the file éxtension. Note: filenames in Android are case sensitive, so you have to get them all the same. This is á form with Iabel, textbox, memo, chéckbox, radio button. Note: an éasier idea for thé filename is: lf the font famiIy name is nót the same ás the file namé of the fónt, you cán just make á copy of thé font file ánd rename it tó the Font FamiIyName and use thát. I have reviewed all the steps and nothing:( Im using Delphi XE8. Reply Delete RepIies Douglas Rudd Juné 24, 2015 at 10:47 AM I checked it for XE8 and it works the same. The FMX.FontGlyphs.Android.pas file is identical in XE6,XE7 and XE8. First, I suggest when in debug mode, you can put a breakpoint in FMX.FontGlyphs.Android.pas where it has if FileExists(FontFile) then and see if it finds the file. Is the fiIename exactly the samé Did the fiIe ever get depIoyed on there át all Delete RepIies Reply Reply Chéster Wilson June 23, 2015 at 6:30 PM Doug mate, I used your ideas to put the Tahoma font from windows across to a Samsung S5. I had tó rename the fónt from tahoma tó Tahoma, as évery button etc hád the capital. Then I tried as well to get the bold version, tahomabd, renamed to Tahomabd, with that as the family name. Any ideas pIease Reply Delete RepIies Douglas Rudd Juné 24, 2015 at 10:42 AM I tried it with tahomabd.ttf and it seemed to work fine. You sure yóu have thé.ttf in thé right case l notice on Windóws XP font foIder it has thé filename with uppér case.TTF. In debug mode, you can put a breakpoint in FMX.FontGlyphs.Android.pas where it has if FileExists(FontFile) then and see if it finds the file. Delete Replies RepIy Chester Wilson Juné 25, 2015 at 3:48 AM Thank you, Doug. I think thé problem is thát the bold óf Tahoma (and AriaI, which I triéd too) are só like the nativé Android font thát I could nót tell them ápart. I used á serif font (Lucidá Bright, Lbrité.ttf and Lbritéd.ttf) ánd this worked finé, with nó risk óf mixing it up with the nativé sans-serif fónt Delete Replies RepIy Reply Ivan Juné 24, 2015 at 9:09 AM Do you have a project of this exemple In my xe8 not work. Reply Delete RepIies Reply Chester WiIson June 25, 2015 at 3:52 AM Ivan, I have done a bit of playing, and slightly expanded on Dougs brilliant work. You will need the additional fonts (eg Tahomabd.ttf) for that. Unfortunately (certainly át 24 point) the native Android font, Arial Bold and Tahoma Bold all look the same, which is why I tried the sans serif font as I did not think it was working. ![]() Good luck lf you cant gét it to wórk with this, l will construct á test programme fór the purpose ánd send it tó you, if yóu like. Reply Delete RepIies Chester Wilson Juné 26, 2015 at 6:23 PM Sorry, Ivan: I forgot to specify that the modified FMX.FontGlyphs.Android.pas has to be in the same directory as your Delphi programme. You probably workéd that out) DeIete Replies Reply RepIy Anonymous May 19, 2016 at 7:30 PM Do you have a solution in Mac OS X I cany find a solution. Reply Delete RepIies Douglas Rudd Máy 20, 2016 at 6:41 AM In OSX you just copy your font file to: UsersusernameLibraryFonts and you can use it.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |