|
40 | 40 | scrollConsoleScreenBufferProc = kernel32DLL.NewProc("ScrollConsoleScreenBufferA") |
41 | 41 | setConsoleTextAttributeProc = kernel32DLL.NewProc("SetConsoleTextAttribute") |
42 | 42 | setConsoleWindowInfoProc = kernel32DLL.NewProc("SetConsoleWindowInfo") |
43 | | - getCurrentConsoleFontProc = kernel32DLL.NewProc("GetCurrentConsoleFont") |
44 | 43 | writeConsoleOutputProc = kernel32DLL.NewProc("WriteConsoleOutputW") |
45 | 44 | readConsoleInputProc = kernel32DLL.NewProc("ReadConsoleInputW") |
46 | 45 | waitForSingleObjectProc = kernel32DLL.NewProc("WaitForSingleObject") |
@@ -125,11 +124,6 @@ type ( |
125 | 124 | Visible BOOL |
126 | 125 | } |
127 | 126 |
|
128 | | - CONSOLE_FONT_INFO struct { |
129 | | - Font DWORD |
130 | | - FontSize COORD |
131 | | - } |
132 | | - |
133 | 127 | CONSOLE_SCREEN_BUFFER_INFO struct { |
134 | 128 | Size COORD |
135 | 129 | CursorPosition COORD |
@@ -264,17 +258,6 @@ func SetConsoleWindowInfo(handle uintptr, isAbsolute bool, rect SMALL_RECT) erro |
264 | 258 | return checkError(r1, r2, err) |
265 | 259 | } |
266 | 260 |
|
267 | | -// GetCurrentConsoleFont retrieves the pixel dimensions of the font for the current window. |
268 | | -// See https://msdn.microsoft.com/en-us/library/windows/desktop/ms683176(v=vs.85).aspx. |
269 | | -func GetCurrentConsoleFont(handle uintptr) (*CONSOLE_FONT_INFO, error) { |
270 | | - info := CONSOLE_FONT_INFO{} |
271 | | - err := checkError(getCurrentConsoleFontProc.Call(handle, uintptr(BOOL(0)), uintptr(unsafe.Pointer(&info)))) |
272 | | - if err != nil { |
273 | | - return nil, err |
274 | | - } |
275 | | - return &info, nil |
276 | | -} |
277 | | - |
278 | 261 | // WriteConsoleOutput writes the CHAR_INFOs from the provided buffer to the active console buffer. |
279 | 262 | // See https://msdn.microsoft.com/en-us/library/windows/desktop/ms687404(v=vs.85).aspx. |
280 | 263 | func WriteConsoleOutput(handle uintptr, buffer []CHAR_INFO, bufferSize COORD, bufferCoord COORD, writeRegion *SMALL_RECT) error { |
|
0 commit comments