Skip to content

Beta 0.4.0 (build 1050-3c4a): unset Paint.typeface renders italic instead of upright #720

Description

@ablersch

Talon version: 0.4.0-1050-3c4a (Beta channel, Windows)
Platform: Windows 11

Summary

When a talon.skia.Paint is drawn without explicitly setting .typeface, text now renders in an italic font. Before this beta, the same unset-typeface code rendered upright. This affects Talon's built-in speech subtitles overlay, and any user/community canvas code that draws text without setting a typeface explicitly (e.g. the community subtitles plugin at https://github.com/talonhub/community/tree/main/plugin/subtitles).

Repro

from talon.skia.typeface import Typeface

tf = Typeface.from_name('')
print(tf.family_name, tf.font_slant)  # -> '', 1   (1 = Italic)

Compare with an explicit family name, which correctly resolves upright:

tf = Typeface.from_name('Segoe UI')
print(tf.family_name, tf.font_slant)  # -> 'Segoe UI', 0   (0 = Upright)

A fresh Paint() has .typeface is None, and at draw time that None apparently resolves through the same fallback path as Typeface.from_name(''), i.e. an italic face, rather than the system's default upright UI font as before.

Expected behavior

An unset Paint.typeface (or Typeface.from_name('')) should resolve to an upright font, matching pre-beta behavior.

Observed impact

  • Talon's built-in "Show Subtitles" overlay now displays in italic, with no setting to change this.
  • Any canvas overlay (own scripts or community plugins) that does not explicitly set paint.typeface is silently affected the same way.

Workaround

Explicitly set paint.typeface = Typeface.from_name("Segoe UI") (or any other named family) before drawing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions