Text in annotations is longer when using colors. Bug?

3 visualizaciones (últimos 30 días)
giannit
giannit el 28 de Jul. de 2020
Comentada: dpb el 28 de Jul. de 2020
Using annotations in matlab I noticed that when I use colored text the spacing between words increases. See the example below
Is this a know bug? Can it be fixed with some workaround?
annotation('textbox',[.2 .5 0 0],'String',["a a a a a a a a a a" "a a a a a a a a a a"],'FitBoxToText','on','FontName','consolas','FontSize',14)
annotation('textbox',[.2 .5 0 0],'String',["a a a a a a a a a a" "\color{red}a \color{black}a \color{red}a \color{black}a \color{red}a \color{black}a \color{red}a \color{black}a \color{red}a \color{black}a"],'FitBoxToText','on','FontName','consolas','FontSize',14)
  6 comentarios
Adam Danz
Adam Danz el 28 de Jul. de 2020
Editada: Adam Danz el 28 de Jul. de 2020
For render info
I tried painters but the problem persists. I doubt the offset is intentional.
dpb
dpb el 28 de Jul. de 2020
I suspect it's all tied in to the font family and the TeX implementation. Probably not much could be done as AFAIK TMW just picked up an opensource TeX distribution and embedded the necessary pieces.

Iniciar sesión para comentar.

Respuestas (0)

Etiquetas

Productos


Versión

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by