On Wednesday, 20 July 2016 12:04 AM, Sebastian Lackner wrote:
On 19.07.2016 15:50, Hugh McMaster wrote:
We decided a while back to only have one font in our font table. I guess that makes SetConsoleFont redundant for the moment. If we were to implement support for multiple file sizes, I'm not sure where that support would reside. Kernel32 is too low-level, as enumerating fonts uses GDI32. Any ideas?
Also note that the Windows font table includes the console raster font and the fonts listed in LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Console\TrueTypeFont.
We list nothing in that registry key, and wineconsole supports all fonts that meet the fixed width criteria, making this a huge task.
Not sure if its feasible, but you could probably implement the enumeration in wineconsole. The table could then (for example) be stored in a temporary registry key (similar to how font caching in gdi32 works).
In general, I think we could just enumerate appropriate font sizes for the active console font. Storing the values (i.e. the font sizes) in a temporary registry key seems to me like a good idea. Those values would be accessible from kernel32 because the registry calls are forwarded to advapi32.