Closed chrisridd closed 2 years ago
If you looked up by index, i.e.
vqt_xfntinfo(handle, 0x0f, 0, 10, &xfntinfo); // index 10
You'd get details for the next font in the list!
I think there are some other places in textlib.c that could use the same find_font_by_xxx()
functions. I'll do those and update the PR.
I have also updated vst_font()
.
vqt_name() looks up fonts by the index.
vqt_xfntinfo() can look up fonts by their id, or by their index. However the algorithm for looking up by index was different to vqt_name()s.
Refactor the lookup logic so they both look up the same way. Optimise vqt_xfntinfo() to not traverse the font list twice.