View Issue Details

IDProjectCategoryView StatusLast Update
0011922Dwarf FortressTechnical -- Renderingpublic2023-11-29 05:02
ReporterBlue-Maned_Hawk Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status newResolutionopen 
PlatformASUS Chromebook Flip C302COSGalliumOSOS Version3.1
Product Version0.47.05 
Summary0011922: PRINT_MODE:TEXT uses the wrong escape codes for bright colors
Descriptionhttps://en.wikipedia.org/wiki/ANSI_escape_code#Colors

PRINT_MODE:TEXT assumes that a terminal will use bright colors when a dark color is combined with bold, despite the fact that there exist escape codes to specify the bright colors directly.
Additional InformationI am using the Kitty terminal emulator, which has no setting to allow the bold escape code to turn colors bright.
TagsNo tags attached.

Activities

anonymous

2023-01-04 14:49

viewer   ~0041618

Technically Kitty is the one doing something non–standard here. On most terminals, the BOLD and DIM attributes caused the intensity to be higher or lower. This gave them up to 24 colors instead of just 8. I think there were some rather expensive HP terminals that displayed BOLD by blitting each character twice, one pixel apart to make the ascenders fatter. Modern terminal emulators can usually rely on having True–Type fonts with a bold variant of every font, and some will use those fonts for BOLD and then ignore DIM entirely (after all, they often have an escape sequence for setting any 24–bit color anyway).

I checked the terminfo manual, and I don’t think that it has a capability that allows programs to determine what the terminal is going to do with BOLD (and it would need to be a query rather than a static boolean in order to support terminals where this is configurable), so it is probably best if Dwarf Fortress had a setting to choose between the current behavior and setting all colors with the 24–bit color escape sequence (https://en.wikipedia.org/wiki/ANSI_escape_code#24-bit).

anonymous

2023-11-29 05:02

viewer   ~0041920

There is a fork: https://github.com/KittyPatch/kitty but it’s pretty out of date and even if you are able to compile it [^1], it still doesn’t work [^2].
It just shifts the problem and i have no idea of what is causing the new problem.

Any way, this issue is with dwarf fortress incorrectly printing characters: https://github.com/kovidgoyal/kitty/issues/197#issuecomment-348062665. Realistically, it should be an option, because some terminals might need that behavior.

[^1]: I was able to compile it by removing the -Werror flag: `find . \( -type d -name .git -prune \) -o -type f -print0 | xargs -0 sed -i -e "s/'-Werror', //g" -e "s/ -Werror'/'/g" && make`

[^2]: base kitty: https://i.imgur.com/FjtAvPa.png vs fork: https://i.imgur.com/hh5lZ2S.png

Add Note

Note

Issue History

Date Modified Username Field Change
2022-10-25 03:56 Blue-Maned_Hawk New Issue
2023-01-04 14:49 anonymous Note Added: 0041618
2023-11-29 05:02 anonymous Note Added: 0041920