Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 577 Vote(s) - 3.59 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Xcode 8 custom font doesn't show up in interface builder

#11
When using the same font (Bebas Neue), I experience the exact same problem: the font does not show up in the font list for `Plain` controls.

It does for `Attributed` controls, as described in Update 2 in Joes post, but then you're actually changing the `attributedText` instead of the regular `text`, which may lead to unwanted behavior. For example, you'll have to fiddle with `NSMutableAttributedString` to change the text or text color at runtime.

I did some investigation on this issue. I used [FontLab Studio][1] to modify the font and do some tests. I used [Bebas Neue version 1.400 (dated September 15, 2014) from dafont.com][2].

- Maybe the font file was somehow corrupted. Re-saved as .otf and .ttf: **Didn't work.**
- Maybe the meta data of the font were corrupted. Copied all the glyphs to a new font and named that Bebas Neue: **Didn't work.**
- I renamed the font from Bebas Neue to BN: **It works!** But why?
- Maybe you can't use "Neue" in a font name (since Helvetica Neue was the iOS system font up to iOS 8). Renamed the font to Test Neue: **Still works.**
- Maybe you can't use "Bebas" in a font name then? Renamed the font to Bebas: **Still works.**
- What... Just to be sure, I changed the font name back to Bebas Neue: **Doesn't work again.**
- I also tried BebasNeue: **Also didn't work.**
- Then I changed the name to Bebas Neue Whatever: **It works.**

[![Bebas Neue Whatever][3]][3]

I really do not understand why this is happening.
Doesn't Apple or Xcode want you to use "Bebas Neue" or "BebasNeue" in the Interface Builder?
I had the normal Bebas Neue installed. Maybe the reference got corrupted?
I really can't tell. Maybe someone on a clean system can try if Bebas Neue works in their Xcode.

Anyway, I achieved my goal: being able to use Bebas Neue (I named the final version "Bebas Neue MyAppName") for `Plain` styled labels and buttons, so I can design my app as-is and don't have to fiddle around with attributed strings.

[1]:

[To see links please register here]

[2]:

[To see links please register here]

[3]:
Reply

#12
It was an [old bug][1] since Xcode 3.x:

> there is a bug/known issue with IB on XCode 3.x with non-standard fonts and Interface Builder. Custom fonts generally need to be set programatically (via [UIFont fontWithName:])

There are some work around like [this][2] with `User Defined Runtime Attribute` and `categories` .



[1]:

[To see links please register here]

[2]:

[To see links please register here]

Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through