CSLoadFontUnicodeRanges Function


A glyph range represents an interval of sequential unicode character codes that the font selected in the Consoul window supports.

In order for the Consoul host application to iterate on all the character codes that the font supports, the host must first call this function to get all the ranges, and then retrieve the boundaries of each range by calling the Consoul CSGetFontUnicodeRange API function.

For a usage example in VB/A see CSGetFontUnicodeRange.


VB/A 32bits

Private Declare Function CSLoadFontUnicodeRanges Lib "consoul_010205_32.dll" ( _
  ByVal hWnd As Long _
) As Long

VB/A 64bits

Private Declare PtrSafe Function CSLoadFontUnicodeRanges Lib "consoul_010205_64.dll" ( _
  ByVal hWnd As LongPtr _
) As Long

Return Value

The return value is the number of unicode glyphs ranges.



The window handle (HWND) of the Consoul window, as returned by CSCreateLogWindow.



CSLoadFontUnicodeRanges, when successfull dynamically allocates memory that has to be released before the Consoul window is destroyed (CSDestroyLogWindow), by calling CSUnloadFontUnicodeRanges. Failure to do so leads to a memory leak in the host process.

CSLoadFontUnicodeRanges does however free itself the dynamic memory allocated on a previous call for the same Consoul window, if it is invoked multiple times; thus CSUnloadFontUnicodeRanges has to be called only at least once for a Consoul window before its destruction if CSLoadFontUnicodeRanges was successfully invoked for it.

Last updated: May 13 2022.