2

I am solving assignment #6 of 2013-2014 cs103p (however is not necessary to know the details of this assignment to answer). I have to implement (not the full version of) the set game, and display the cards in a collection of buttons. The symbols used are ▲,●,■.

I use an attributed string to represent the color of the symbol. The shadings are solid, striped and open. For a solid and striped symbol I just change the value of NSStrokeWidthAttributeName, which is non zero for an open character.

Now the problem comes with a striped character. I downloaded a font to represent striped characters: mexcellent. But the problem is that the stripes are applied only to regular alphabet characters, not to my symbols. How do I manage to represent these characters with stripes?

Ramy Al Zuhouri
  • 21,580
  • 26
  • 105
  • 187

2 Answers2

2

If you look at the character map of the font here: http://www.1001fonts.com/mexcellent-font.html#character-map

You can see that your symbols aren't included in this font. The system just chooses another font to render these characters.

You need to use a font which includes the desired symbols.

Flovdis
  • 2,945
  • 26
  • 49
0

Don't know if still relevant but I'm just doing now the same assignment.

I've used this attribute to make a transparent symbol as striped

NSForegroundColorAttributeName with [[UIColor someColor] colorWithAlphaComponent: alphaValue] 

but it not actually doing striped symbols.

Rugmangathan
  • 3,186
  • 6
  • 33
  • 44
AMI289
  • 1,098
  • 9
  • 10