I have replaced all TextField objects with TextLayout as I require the functionality it offers. When using TextLayoutFormat I try to embolden text using “this._textLayoutFormat.fontWeight = FontWeight.BOLD;”
Adobe have said you can only embolden text when using device fonts:
“Applies only to device fonts (fontLookup property is set to flash.text.engine.FontLookup.DEVICE).”
This seems crazy to me! Does anyone know of a work around?
You have to embed your font twice: once with a normal weight “myFont” and once with fontWeight=bold “myBoldFont”, then you should be able to switch from normal to bold by changing the fontName of your TextField. I do agree, this is stupid.