source-sdk-2013 icon indicating copy to clipboard operation
source-sdk-2013 copied to clipboard

Closed captions do not appear unless italicized

Open Blixibon opened this issue 1 week ago • 2 comments

Describe the bug

Closed captions/subtitles do not appear in HL2, HL2:DM or TF2 mods on the master branch unless they are italicized. Instead, the caption HUD element appears with no content. For italicized captions, the captions appear, but they do not have italics.

Steps to reproduce

Steps to reproduce the behavior:

  1. Turn on closed captions in the Options menu of any of the above games.
  2. Use the cc_emit command to manually play a caption, or play a sound which has an accompanying caption.
  3. Depending on the formatting of the caption, it may either not appear or use the wrong font.

Media

Here's a video showing the issue in HL2:DM:

https://github.com/user-attachments/assets/ee6f949b-fa83-4958-928e-b5b97a8f8c84

These are the captions that were dispatched:

	"testcommands"			"<clr:255,0,0>This is red<I> and italics<B> and<cr>bold<B><I><clr:255,255,255> white again."
	"BaseExplosionEffect.Sound"	"<sfx><norepeat:4><playerclr:255,176,0:255,255,255><I>[EXPLOSION!]"
	"PropJeep.AmmoClose"	"<sfx><norepeat:4><clr:255,176,0>[Ammocase close]"

Notice how the unitalicized captions did not appear, while the italicized captions lost their italicization.

I have not tested unitalicized bold captions.


Here's another video showing the issue in TF2:

https://github.com/user-attachments/assets/a2b5745e-6cf9-4ab9-94fe-049c51045d8e

Note that commentary nodes are the only source of captions in default TF2, although some mods may add more.

Blixibon avatar Feb 22 '25 01:02 Blixibon