Displaying hebrew text on screen
Asked Answered
S

1

11

I want to display hebrew text on the screen using the text command in MATLAB:

text(0.6, 0.5, 'ירוק', 'rotation', 180, 'fontsize', 50, 'color', 'r')

The problem is that it displays gibberish.

Does anybody know why? What should I do in order to display the text correctly?

Spunk answered 9/1, 2011 at 15:29 Comment(2)
It might well be an encoding problem - the "gibberish" you're seeing may be a result of Matlab interpreting the file as using a different character set to what you've saved it as. What exactly did get displayed? Was it:  ירוק or something similar?Tamanaha
... and if they don't, then add comments and/or update your question with the extra information describing why they're no good :-)Tamanaha
S
12

You need to use a font that supports Hebrew characters - the default font (Helvetica) does not. You can use 'Courier', David' etc. For example:

text(0.6,0.5,'ירוק','fontname','david','rotation',180,'fontsize',50,'color','r')

בהצלחה!

Schist answered 9/1, 2011 at 19:27 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.