How to use a custom font in Xcode's attributes builder - objective-c

Can someone outline the procedure to use custom fonts in Xcode's attributes builder. I was hoping to use the .storybuild file (not using code) to create a UILabel with the custom font "Delicious". I downloaded the .otf file, added it to the Font Book, copied the font file into the project folder in Xcode, added "Fonts provided by application" with the font name to the -file.plist. But I still cannot see the font in the attributes builder drop down font list. Do I need to do anything else?
PS: I am using Xcode 4.5.

I don't believe you can get custom fonts to show in the dropdown in interface builder. IB only shows fonts available on the device OS you are targeting. If you want to use custom fonts, you will have to set them in some code.
http://kgriff.posterous.com/45359635

Related

VB.NET - Adding a custom font and selecting from properties

Does anyone know how I can add a new custom font into visual studio and then be able to select it from the properties menu?
Example I add Poppins font, install into OS. I want to be able to edit a labels font to that new font in the properties screen. I do not want to do it programmably.
Thanks

Interface Builder: custom fonts don't appear in list

I've added some custom fonts to the project:
The fonts are added to the target, are included in the "Copy Bundle Resources" list, and are also added to Info.plist under Fonts Provided by Application.
However, those fonts don't show correctly in the Interface Builder. It shows the font family (CentraleSans), but gives me only 2 font choices for that family.
Moreover, the actual font IB ends up using seems random (the final selection can be CentraleSansBold or CentraleSansBook, or other ones, for the same family/font values I pick). Notice how in the screenshot above it says "CentraleSansBook", even though that was not an option in the drop down list. Is this an IB bug?
OK, I found a way to make it work. I had to install the custom fonts on my Mac. Double-click on the font file in Finder, then click "Install Font". After that the font will appear in the drop down list in IB.

Add PDF font to JasperReport export

I am using iReport to create a series of reports. In iReport my default font is set to "SansSerif"; on my machine (Ubuntu Linux) this is actually DejaVu Sans. Ultimately the reports need to be rendered as PDF files. When a PDF is generated the text font is actually Helvetica and is causing formatting issues. Ideally the font in iReport would be the same as the PDF font. That is where my issue resides.
I have tried changing the net.sf.jasperreports.default.pdf.font.name setting to 'DejaVu Sans' but that throws an error about the font not being found. From what I understand it is actually iText creating the PDF. Is that correct? In the iText jar Helvetica is embedded in the jar. Does the same thing need to be done to the other fonts? How does one go about that?
I have researched this and tried all kinds of things. Any ideas would be appreciated.
To install missing fonts in iReport, Access the following sub-items from the menu bar
Tools > Options >Fonts > Install Font
Add fonts files e.g garamond.otf,
Add font family details
Select locale of your country
Manage font mapping to avoid the missing font property in OS
After adding all required fonts click on Export as extension to save the jar extension
Add this Jasperreport-font.x.x.x.jar on your project library or classpath

About Box Contents

I came across this About dialog of the Sparrow Mail app. Is this possible 'out of the box' within the AppDelegate or is this a real 'window' I will have to develop so I can replace the default Apple generated one with the credits?
The About Box gets its content from the "Credits" RTF file that is present in all app-level projects created by Xcode templates. You can edit it within Xcode or in any rich text editor (including hyperlinks, formatting, etc.).
The icon is taken from the app's bundle settings (Info.plist) and requires no extra work beyond setting the app's icon (so don't include it in your RTF file). Similarly, the version is taken from the bundle settings. In other words, everything below the icon and version line comes from the rich text file.

JSFL - Flash CS4: replace textfields' font by an embedded font

I have tried a bunch of JSFL scripts to change textfields' fonts of a fla library. I used those scripts to change textfields' fonts for an embedded font which do exist in the library. All scripts run fine through Flash CS3 but always fail through Flash CS4
Let's give an example: replacing the "Arial" font used by all textfields in the fla scene by the "myEmbeddedArial*" embedded font (symbol).
The jsfl font replacement instruction is the following one:
textElement.setTextAttr("face", "myEmbeddedArial*");
I can give a lots of all details about this issue but does someone already observed it and may know about its root cause ?
Thanks
P.S: Note the Find/Replace "Font" feature of Flash CS4 IDE works properly only if the textfields contain not emtpy strings and only if the symbol including this textfield is in a scene and only if you search in "Current Document" (and not in "Current Scene").
I am not sure if it works for you but maybe:
http://blog.samueltoth.com/?p=142
Good luck,
Rob
I think I found a successful workaround. So the only way to properly do that in CS4 IDE is to use the find/replace function, but the textfields' content must not be empty.
Use your jsfl script to fulfill all empty textfields of your symbol library with a marker string like '####'.
Ensure all the embedded font symbols used on your textfields are in your fla library. Because find/replace tool will not parse the textfields which use some embedded font symbols which don't exist in the library. Indeed some embedded font symbols may have been deleted and/or mapped on a default font (manually or during a file conversion from CS3 to CS4). Especially take care to case sensitivity on the embedded font symbol names.
Create the missing embedded font symbols used on your textfields (with the right case sensitive names) before using find/replace feature.
Create the new embedded font symbols you want to use to replace the old embedded font symbols.
Now you should be able to use find/replace feature of CS4 properly even with embedded font symbols. Open find/replace window. Select "Search in: Current Document" (not in "Current Scene"). Create a new layer on your main scene. Create an instance of all the movie clips you have in your library in this layer (e.g: select all the symbol library then drag & drop the selection in the scene).
Don't forget to remove your '####' string marker from all the textfields by using your jsfl script or the find/replace Text feature of the IDE. Finally delete the layer you created for the font replacement operation and all the symbol instances in it.