Buckie Posted September 11 Posted September 11 Is it possible to use TextStyleAdd, or any stock function, really, to change the text weight in more than 2 steps (plain, bold)? I have a font that has "light" weight, then "regular" weight, "semibold" and so on. In CSS those are usually represented by a number that goes from 100 onwards allowing for precise control over weights. However I could find nothing of the sort in FileMaker. In fact, supplying "Plain" to TextStyleAdd fails to assign "regular" (bolder) weight to a text box which has "light" weight assigned in the layout. Is there a simple way to work around that?
comment Posted September 11 Posted September 11 The available styles are what you see in the list. However, you may be able to choose a specific font variation using the TextFont() function. For example, with: List ( TextFont ( "abcdef" ; "Optima" ) ; TextFont ( "abcdef" ; "Optima Bold" ) ; TextFont ( "abcdef" ; "Optima ExtraBlack" ) ) I get:
Buckie Posted September 18 Author Posted September 18 (edited) Ah, that's indeed correct. I was trying to migrate "Gill Sans" stock font from macOS to Windows to continue working on a solution, but something went wrong and only a single weight got successfully installed. Windows indeed labels fonts separately in the fonts list whereas macOS would group them by the base font name and there'll be a separate drop-down with weights and styles. Hence the initial confusion. But it's still not clear what TextStyleAdd does then (both on Windows and on a macOS). Does it try to pull "Bold" (as an example) weight from an actual separate font file (e.g. Gill Sans Bold), or does it simply fake bold by applying it to the currently selected font variant? Edited September 18 by Buckie
comment Posted September 18 Posted September 18 35 minutes ago, Buckie said: what TextStyleAdd does I think it tries to find the bold variation of the font first, and if it fails it applies "faux" bold. At least that's what my limited experiments (on macOS) lead me to believe. It might be different on Windows. You could do your own test by comparing the result with text formatted properly with the bold variation of the font.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now