ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  Weight of Text
Posted by Dan on Feb-08-2017 19:19
Attachments:
Hi,

Everything our current chart libs does seems as it can be done by ChartDirector.

Perfect!

There is one thing though that I've failed to reproduce.

In our current solution we choose a font and then we can set the weight of the font.

The weight is how thick or thin the font will look.
Skärmavbild 2017-02-08 kl. 12.17.36.png
Skärmavbild 2017-02-08 kl. 12.18.18.png

  Re: Weight of Text
Posted by Peter Kwan on Feb-09-2017 20:55
Hi Dan,

For the majority of the fonts, the various styles (like "Arial Regular", "Arial Bold", "Arial Italic" and "Arial Bold Italic"), are really different fonts in different font files. For some fonts, there can be many styles. For example, the Windows 8 font "Segoe UI" has "Regular", "Light", "Semi Light", "Bold", "Semi Bold", "Italic" and "Bold Italic" styles.

Some user interface has a font picker system. The user can choose the font family and weight, and the system will pick the nearest font. The followings are some examples:

- Arial with weight 500 => choose "Arial Regular", as 500 is closer to Regular than Bold

- Segou UI with weight 500 => choose "Segoe UI Semi Bold"

- Segou UI with italic and weight 500 => choose "Segou UI Italic", as there is no Semi Bold Italic for the Segou UI family.

Unluckily, ChartDirector does not have a built-in font picking system. Your code would need to use your own code to choose the exact font to use based on the user selection.

For your information, in the Windows OS, the table for the various font families, styles and their associated font names is in:

HKEY_LOCAL_MACHINESoftwareMicrosoftWindows NTCurrentVersionFonts

Regards
Peter Kwan

  Re: Weight of Text
Posted by Dan on Feb-09-2017 21:03
I didn't know that weight actually was a mapping of fonts.

Then I see no problem regarding this.


Thanks again!