Bold Font in iOS

Good afternoon.

I’m trying to display some stuff in a canvas in iOS. Font is Optima (for now). When I make it bold the letters appear bold but the numbers don’t.

In Word numbers appear bold.

Is this an issue?

Word maybe synthesizing Bold.

You may want to check http://iosfonts.com/ to pick a font natively bold.

for iOS (and Xojo make internally do this), you must select the font with the attributes

  • Optima
  • Optima-Bold
  • Optima-Italic
  • Optima-BoldItalic

I tested this using Swift, and ALL characters (letters, numbers et’al) were properly bold… So Word is not synthesizing it, but perhaps if XOJO internally swaps out font names to add bold etc, it it failing to do it for numbers

Works fine in Xojo, also.

Sub Paint(g As iOSGraphics) Handles Paint dim optimaBold as new iOSFont("Optima-Bold", 40) g.textFont = optimaBold g.drawTextLine("42424242", 50, 200) End Sub

[quote=310453:@Gavin Smith]Works fine in Xojo, also.

Sub Paint(g As iOSGraphics) Handles Paint dim optimaBold as new iOSFont("Optima-Bold", 40) g.textFont = optimaBold g.drawTextLine("42424242", 50, 200) End Sub[/quote]

a proper test from Xojo point of view would be

  dim optimaBold as new iOSFont("Optima", 40)
g.bold=true
  g.textFont = optimaBold
  g.drawTextLine("42424242", 50, 200)

wouldn’t it???

[quote=310456:@Dave S]dim optimaBold as new iOSFont(“Optima”, 40)
g.bold=true
g.textFont = optimaBold
g.drawTextLine(“42424242”, 50, 200)
[/quote]

g.Bold does not exist in iOSGraphics.

another shortcoming I assume :slight_smile:
So then how does that explain the OP not seeing what Gavin duplicated

Without his code, it is a mystery.

Thanks to everyone.

However, it’s my bad. I discovered another place where I set the font.

Bold works fine.

Sorry for the loss of productivity.