Remove what only the Qt frontend used
- The theme/font request globals (gThemeChange*, gFont*Request, gFontChangePending, gCurrentFont*, gFontDialogRequested): only Qt read them. - The font-picker-toggle command: it only set gFontDialogRequested, so it did nothing in kge or kte. - The terminal :font and :font-size recorded requests nothing read and answered "Font requested"; they now say fonts are not available in the terminal. - kte::DisplayColumns, added for Qt's drawing and now unused. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
-21
@@ -8,7 +8,6 @@
|
||||
#include <cstddef>
|
||||
#include <cwchar>
|
||||
#include <string_view>
|
||||
#include <vector>
|
||||
|
||||
namespace kte {
|
||||
// Tab stops every kTabWidth columns, in every frontend and in the command
|
||||
@@ -70,24 +69,4 @@ MeasureChar(std::string_view line, std::size_t i, std::size_t col, std::size_t &
|
||||
else
|
||||
width = static_cast<std::size_t>(CellWidth(wch));
|
||||
}
|
||||
|
||||
|
||||
// The display column at which each byte of `line` is drawn (bytes inside a
|
||||
// multi-byte character share its column); out[line.size()] is the line's
|
||||
// width. Lets a renderer map byte offsets to columns without rescanning.
|
||||
inline void
|
||||
DisplayColumns(std::string_view line, std::vector<std::size_t> &out)
|
||||
{
|
||||
out.assign(line.size() + 1, 0);
|
||||
std::size_t col = 0;
|
||||
for (std::size_t i = 0; i < line.size();) {
|
||||
std::size_t len = 1, width = 1;
|
||||
MeasureChar(line, i, col, len, width);
|
||||
for (std::size_t k = 0; k < len && i + k < line.size(); ++k)
|
||||
out[i + k] = col;
|
||||
col += width;
|
||||
i += len;
|
||||
}
|
||||
out[line.size()] = col;
|
||||
}
|
||||
} // namespace kte
|
||||
|
||||
Reference in New Issue
Block a user