Creating a fast forward button with consistent visuals

22 views (last 30 days)
I have been making some audio control buttons such as a play button with:
uibutton(Text=char(0x23F5), FontName="monospaced")
Note that I am using the "Monospaced" font, which MATLAB is using for the editor and command window by default. This button shows the same symbol that would show in the command window if I were to print the text. This is the same for most of the media UTF-8 symbols.
However, if I run the same command, but using the code for the fast forward button, I get a different style symbol, despite explicitly defining the font that I want the button to use.
uibutton(Text=char(0x23E9), FontName="monospaced")
My question is what is causing this discrepancy, and how can I mitigate this?

Accepted Answer

Matthew Moschella
Matthew Moschella on 10 Dec 2025 at 16:06
Did some investigating, seems like the uibutton uses the "Segoe UI Emoji" font when the text is a UTF-8 symbol.
I also see the 'all-black' version of the fast-forward button when I enter char(0x23E9) in the command window. If you copy and pase this into a Word document the symbol changes to the blue version you are seeing and the font is listed as "Segoe UI Emoji". Interestingly though, if you enter char(0x23F5) in the command window and copy that into a Word document you get a 'tofu' symbol.
Based on some google searching it appears that the Segoe UI Emoji font doesn't have a supported icon for the 0x23F5 symbol but it does have one for the 0x23E9 symbol. I imagine when MATLAB attempts to 'render' the 0x23F5 it is defaulting to another font that does have a supported symbol. Having said that, it's unclear why MATLAB is forcing a font other than the 'Monospaced' that you have declared.
I think the easiest solution is to use the 'Icon' property of uibutton to instead display images of these symbols.
  1 Comment
Damien Watson
Damien Watson on 10 Dec 2025 at 16:51
Hmm, looks like you may be right. It is a shame to have to resort to using an icon (with SVG for infinite scaling), but I guess that might be the best solution for now.

Sign in to comment.

More Answers (0)

Products


Release

R2024a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!