Using system fonts on Windows (fontconfig equivalent?)

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Using system fonts on Windows (fontconfig equivalent?)

Elvis Stansvik
Hi all,

Cross-posting since I'm not sure if vtkusers@ or vtk-developers@ is
most appropriate for this.

On Linux, I'm using the vtkRendereringFreeTypeFontConfig module, so
that I can use system fonts (e.g. for charts labels et.c). The goal is
to make VTK fonts match those used by Qt, so I'm using
QFontDatabase::system(...) to query for the user's preferred font, and
then use that in my VTK code. This is all working quite well.

I'm now porting the application to Windows. Does VTK have any support
for loading system fonts on Windows? Something similar to the
vtkRendereringFreeTypeFontConfig, but for whatever font backend
Windows uses?

If not, has anyone had luck in building fontconfig for Windows, and
using the vtkRendereringFreeTypeFontConfig module there? (I'm not even
sure if fontconfig has support for hooking into Windows' font backend,
so this may not be a solution at all).

Many thanks in advance,
Elvis
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [vtk-developers] Using system fonts on Windows (fontconfig equivalent?)

David Lonie-2
AFAIK, the only option on windows would be to load the font file
directly using vtkTextProperty::SetFontFamily(VTK_FONT_FILE) and
vtkTextProperty::SetFontFile(...). I've never heard of FontConfig
being used on Windows, but I haven't really looked into it, either.

Good luck!

Dave

On Tue, Apr 11, 2017 at 4:45 AM, Elvis Stansvik
<[hidden email]> wrote:

> Hi all,
>
> Cross-posting since I'm not sure if vtkusers@ or vtk-developers@ is
> most appropriate for this.
>
> On Linux, I'm using the vtkRendereringFreeTypeFontConfig module, so
> that I can use system fonts (e.g. for charts labels et.c). The goal is
> to make VTK fonts match those used by Qt, so I'm using
> QFontDatabase::system(...) to query for the user's preferred font, and
> then use that in my VTK code. This is all working quite well.
>
> I'm now porting the application to Windows. Does VTK have any support
> for loading system fonts on Windows? Something similar to the
> vtkRendereringFreeTypeFontConfig, but for whatever font backend
> Windows uses?
>
> If not, has anyone had luck in building fontconfig for Windows, and
> using the vtkRendereringFreeTypeFontConfig module there? (I'm not even
> sure if fontconfig has support for hooking into Windows' font backend,
> so this may not be a solution at all).
>
> Many thanks in advance,
> Elvis
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Search the list archives at: http://markmail.org/search/?q=vtk-developers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtk-developers
>
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers
Loading...