memononen / nanovg

Antialiased 2D vector drawing library on top of OpenGL for UI and visualizations.
zlib License
5.15k stars 771 forks source link

Add functionality for loading specific font faces from .ttc files #540

Open AlexHarker opened 5 years ago

AlexHarker commented 5 years ago

This pull request adds two font loading functions that allow loading faces from .ttc files (on disk or in memory) given an index for the face. This involves changes through into fontstash.h to update font loading to support this. This should support this functionality for either stb_true_type or freetype.

There are also some minor cosmetic fixes in the other two commits.