Also note the IO pin equivalent DC resistance is uncontrolled and varies somewhere between maybe 10 and 30 ohms depending on unit, temperature, etc. This will be in series with any external resistance.
OTOH, it can work out to be somewhat self-regulating: if the particular LED Vf is lower than you expect (a low Vf unit, or hot LED temperature), it draws more current, causing more heating in the MCU IO MOSFET, heating it up, causing the IO pin resistance to go up, lowering the current. Such a negative Rds(on) feedback loop can compensate for the positive feedback loop of the LED Vf per temperature.
Of course, do the IO pin current draw analysis for the worst case Vf of the LED.
Note that for better current regulation at Vled=5V and larger resistor value (as shown by SiliconWizard), you won't necessarily need external transistor: STM32 MCUs have IO pins which are 5V tolerant and have the open-drain output mode. I tend to use that when directly powering low-current LEDs with Vf too close to 3.3V.
If you decide to not use the IO pin to power the display directly, the transistor route isn't that much better; it's extra parts, and it's still kinda sucking at current regulation. Consider using a constant-current linear LED driver with enable pin instead: these are cheap and come in tiny packages, and the part count will be lower because no resistors are needed at all. They tend to come with some fixed current settings like 10mA and 20mA.