Page 1 of 1

Any way to RegisterFont in Noesis and get all the info like family and weight?

Posted: 30 Sep 2021, 14:55
by krupitskas
Hey! Question is, when I RegisterFont in the noesis, I provide font name. Noesis parses the whole font and receives family name and weights and etc. Can I somehow ask it from noesis or should I use a separate 3rd party library?

Re: Any way to RegisterFont in Noesis and get all the info like family and weight?

Posted: 30 Sep 2021, 15:20
by jsantos
There is an internal function for that but it is internal and not available without access to source code
void EnumFontFaces(Stream* stream, const FontFaceInfoCallback& callback);
Does WPF offer a similar functionality?

Do you need to do this at runtime? Because you can easily get this information from Blend or Windows (clicking on the font)

Re: Any way to RegisterFont in Noesis and get all the info like family and weight?

Posted: 03 Oct 2021, 16:09
by krupitskas
We have not access to source code. Not sure about WPF, we have C++ engine.
Yup, we are loading bunch of fonts, after we want to receive them for runtime text placement. So when we loading font we know only filename.
But font family name not always match filename, so Im looking for a way to receive all this information. I've hoped that noesis already parse all of this and can give you info back.
I would be cool that RegisterFont can give you familyname as return value, and maybe something else.

Re: Any way to RegisterFont in Noesis and get all the info like family and weight?

Posted: 04 Oct 2021, 13:05
by jsantos
Please, open a ticket about it. We will think how to solve this.

But, if you can do this offline, it is much preferred.

There is also an option in WPF (not supported in Noesis for now) to specify the name of the ttf filename, instead of the family name.

Re: Any way to RegisterFont in Noesis and get all the info like family and weight?

Posted: 06 Oct 2021, 19:59
by krupitskas
There is also an option in WPF (not supported in Noesis for now) to specify the name of the ttf filename, instead of the family name.
This is actually would be nice.

Issue: https://www.noesisengine.com/bugs/view.php?id=2140

Re: Any way to RegisterFont in Noesis and get all the info like family and weight?

Posted: 07 Oct 2021, 13:23
by jsantos
Thanks!