View Issue Details

IDProjectCategoryView StatusLast Update
0006687The Dark ModCodingpublic16.02.2026 20:07
ReporterGeep Assigned To 
PrioritynormalSeveritynormalReproducibilityhave not tried
Status newResolutionopen 
Product VersionTDM 2.13 
Summary0006687: Feature Request: Drop "carleton_condensed" font, treat as alias to "carleton@aspect=16:9"
DescriptionNow that there is the GUI "font" suffix "@aspect", the need for a separate (and ugly-charactered and incomplete) "carelton_condensed" font is just a maintenance headache. It is proposed that the code that parses GUI "font" parameter arguments be revised to treat a fontname suffix of "_condensed" as an alias for "@aspect=16:9".

Then the associated carleton_condensed folders with their DAT and DSS files can be removed.

Two minor issues -
- Is 16:9 the right aspect to match existing carleton_condensed font? Need to verify/adjust.
- Carleton_condensed is used with 24pt bitmap size. Evidence seems to suggest it is never (effectively) used with 12pt or 48pt sizes. For 12pt, the same DAT and DDS is used as for "carleton". For 48pt, although the DAT differs from carleton's, the set of DDS do not... probably the DAT just has a spurious difference.
Additional InformationRelated to Bugtracker 6656: Improvements to Carleton 24pt

// CONCEPT SAMPLE CODE, NOT COMPILED

In DeviceContent.cpp.

static idStr ParseFontParameters( const idStr &fontName, fontParameters_t &params ) {
>>> START ADDED CODE
    // Shown using <string> functionality. Adapt as needed to idString
    string font_name = fontName.c_str();
    if (font_name.ends_with("_condensed")); // C++ 20. For earlier versions, see https://stackoverflow.com/questions/874134/find-out-if-string-ends-with-another-string-in-c
    {
        // assuming the requesting gui "font" command did not already append @aspect to a _condensed font name
        size_t position = font_name.substr("_condensed");
        if (position != std::string::npos)
        {
            // strip off "_condensed"
            font_name = font_name(0, position) + "@aspect=16:9";
            fontName = (idStr)font_name;
        }
    }
>>> END ADDED CODE
    idStringList tokens = fontName.Split( "@", false );
    idStr fileName = tokens[0];

    for ( int i = 1; i < tokens.Num(); i++ ) {
        const idStr &tok = tokens[i];
        int X, Y, len;

        // stgatilov 0006283: @aspect=X:Y
        // results in intended font proportions on X:Y screen resolution
        if ( sscanf( tok.c_str(), "aspect=%d:%d%n", &X, &Y, &len) == 2 && len == tok.Length() ) {
            assert( X > 0 && Y > 0 && X < 5000 && Y < 5000 ); // be sane, please!
            // for widescreen resolution, reduce virtual X size to get correct on-screen proportions
            params.scale.x = float(4 * Y) / (3 * X);
        }
        else {
            common->Warning( "Unknown font %s parameter: @%s", fileName.c_str(), tok.c_str() );
        }
    }

    return fileName;
}
TagsNo tags attached.

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
16.02.2026 20:07 Geep New Issue