I've seen all the talk on the web about the difficulty of using a custom font in iPhone OS. Is it possible, to load a font from within my bundle into the UIWebView component?
EDIT: I saw it in the app called "Omer" by "Rusty Brick"... It seems to be a web view, because I see a delay and during the loading delay the custom area is white. What other component could this have been?
EDIT2: I contacted Rusty Brick. They told me which font it was. A standard font.
It is possible to load custom fonts into your UIWebView in iOS3.2 and above. Add the font to your bundle (see here) then just reference the font in your UIWebView's stylesheet like you would any other font:
<style type='text/css'>font { font-family: DroidSerif; } </style>
It is possible, but you need to make certain to add the Fonts provided by application key-value pair to the Info.plist.
I learned about it in this tutorial: http://tetontech.wordpress.com/2010/09/03/using-custom-fonts-in-your-ios-application/
I tried it with a LWFM and a FFIL font suitcase, but this didn't work. In the end I needed the TTF file of the font.
When referencing the font in your code use the PostScript name. To get the correct name for your font, open the Font Book application, select the font and click on the i in the upper left corner to open the information panel.
Related
My website's Arabic font letters appears separated from each other which makes it un readable so I want to use a different font that will display only on iPhone & iPad devices in wordpress, I am using Elementor to design the site. Is there's a code or plugin I can use to apply different font for iOS devices?
https://ozaro.com/ar/our-history/
Well you cant do that just using css. You'll need JavaScript too.
Here is an answer on finding if device is iOS or not.
So basically this is what you'll have to do.
Set a unique classname for the parts of your website you need that font to be applied. E.g. "arabicf"
Go to your footer builder and drag drop an html widget.
Inside the widget write your js between script tags.
P.s. the logic behind the js is simple
If ios then "arabicf" style fontFamily = X.
I have a native app that uses Mapbox, my app is mainly for Kurdish customers.
I have a really big problem, the texts and addresses shown on the app use a font that displays the Kurdish texts poorly, I like to make the map show all texts and addresses using Noto Kufi Arabic font or any other font I like.
But how do I do that?
You can customise your style in Mapbox Studio by replacing the font to your liking, then publish your new style and use it in your app.
Is it possible to use custom fonts with github's markdown? I'm currently loading an image as a logo, yet rendering a font would be faster and nicer.
rendering a font would be faster and nicer.
Yes, except you wound not use any (multiple) colors in said "icon as a font".
See "GitHub redesigns its icons using a custom font"
You can, of course, take a monotone font-rendered icon and set its colour to, for example, red or blue, but that changes the entire icon; you can’t have different parts of the icon use different colours, or use shading
(example of CSS effects for Icon Font here, from the Trello article)
But, as far as I can see (Markdown Cheatsheet, and Markdown Help), no, you cannot have a custom font.
You can have a custom font, just generate it with https://github.com/crocodilejs/custom-fonts-in-emails and then you can just put the image/upload it to GitHub readme.
I have a few UITextFields and I would like the user to be able to change the font's appearance within those fields.
Right now I have a UIToolbar with 5 buttons used for font controls. One for font name, one for size, one for color and one for alignment.
To change font, I display a picker with the fonts family names, letting the user pick default font for that family.
For the font color, I display another toolbar with a font size slider
For font color, I display an open source color picker
For font alignment, I display a button that cycles through the left/center/right alignment.
Finally there's a close button that hides the toolbar.
Currently all of my code is in one controller, but I would like to have it refactored into a separate, reusable class.
Since I'll be rewriting code, are there any open source font controls like I'm describing above? Maybe I can just plug in something that's already made into my project?
Thank you!
It wouldn't be very hard at all. Instead of pickers use a scroll view with buttons and labels above them using the font. As for size you could do the same!
This would be easy in Xcode 4, not so sure in 3.X.X
I found that the attributed string example by apple does have a table view-like font controller that includes a preview of what fonts look like. I think extending that controller may be the easiest thing to do:
http://developer.apple.com/library/ios/#samplecode/CoreTextPageViewer/Introduction/Intro.html
I have an iPad/iPhone app and when I pick a font for my label it does not display the typeface.
For example, I have a Label and have chosen the Handwriting Dakota font, but when I view my .xib it is a standard font... likewise, the font does not show correctly in the simulator.
What do I need to do to make font show in the correct typeface?
Unless you have your app install your custom font on the device, you are limited to the typefaces that iOS ships with. See iosfonts.com for a list.