Characters are fuzzy. Where do these fonts come from?

10 visualizaciones (últimos 30 días)
Paul Mennen
Paul Mennen el 11 de Abr. de 2022
Comentada: DGM el 12 de Abr. de 2022
I ran the script show below on my windows 10 based computer with 3 differenct versions of Matlab (2021b, 2013b, and version 6.1 from 2001).
The top figure in the image shown below is from Matlab 6.1 and is also identical to the figure generated by Matlab R2013b. (I looked quite carefully and I couldn't see any differences). The bottom figure is from Matlab R2021b. Note that the top line uses the default font which is Helvetica followed by 5 other popular fonts (the last two with serifs). The default font size (which is 10) has been used thruout. One fairly objective difference is that Matlab 6 uses less horizontal space for the default font and for the Lucida Fax font, but uses more horizontal space for Verdana and the Times font (when compared to Matlab 2021b). A more important difference is obvious to me immediately. The characters in the top figure are bright, crisp, and pleasing where as the characters in the bottom figure are ... well excuse my language ... shitty. Makes me think I forgot to put my glasses on. I'm I wrong to be worried about essthetics in a computational tool? I can after all read the text in both figures, but good looking figures just make me feel better (whether it's a figure on a computer screen or a person's figure). Where does Matlab get these fonts from? If it's from Windows, shouldn't they look the same in all Matlab versions? If Matlab stores these fonts internally, is there any hack to allow Matlab 2021b to import a font from an older version of Matlab. I would be happy with just two nice looking san serif fonts (one proportionally spaces like Helvetica and one mono spaced such as Lucida Sans Typewriter). By the way, although I used white characters here, the same effect is there when using black characters on a white background. Thanks for any insights you may have. ~Paul
figure('pos',[10 10 995 140],'Menubar','none');
axes('pos',[0 0 1 1],'color','black','xcolor','black','ycolor','black');
t = ['The quick brown fox jumps over the lazy dog. ' ...
'1234567890-=~!@#$%\^&*()+?>< ' ...
'THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG.'];
text(.01,6/7,t,'color','white');
text(.01,5/7,t,'color','white','fontname','Verdana');
text(.01,4/7,t,'color','white','fontname','Segoe UI');
text(.01,3/7,t,'color','white','fontname','Lucida Sans Typewriter');
text(.01,2/7,t,'color','white','fontname','Lucida Fax');
text(.01,1/7,t,'color','white','fontname','Times');
  1 comentario
Rik
Rik el 11 de Abr. de 2022
I don't have an actual answer for you, but this is one of the reasons why I wrote my text2im function.

Iniciar sesión para comentar.

Respuestas (1)

DGM
DGM el 11 de Abr. de 2022
Editada: DGM el 11 de Abr. de 2022
Well, this shows up like extra-fuzzy garbage in the forum editor due to the figure resizing, so I don't know if this demonstrates anything. It looks better when I run it on desktop, but I don't have these fonts, so I'm running it here instead.
At any rate, here's a possible improvement. Try turning off the font smoothing. As far as what I'm seeing from other posts, the font smoothing in various parts of the newer versions (e.g. the editor) is what might be described as "aggressive" or "bad". That's just my second-hand impressions though. It might also depend on the environment.
figure('pos',[10 10 200 140],'Menubar','none');
axes('pos',[0 0 1 1],'color','black','xcolor','black','ycolor','black');
t = ['The quick brown fox'];
text(.01,6/7,t,'color','white');
text(.01,5/7,t,'color','white','fontname','Verdana');
text(.01,4/7,t,'color','white','fontname','Segoe UI');
text(.01,3/7,t,'color','white','fontname','Lucida Sans Typewriter');
text(.01,2/7,t,'color','white','fontname','Lucida Fax');
text(.01,1/7,t,'color','white','fontname','Times');
figure('pos',[10 10 200 140],'Menubar','none');
axes('pos',[0 0 1 1],'color','black','xcolor','black','ycolor','black');
t = ['The quick brown fox'];
text(.01,6/7,t,'color','white');
text(.01,5/7,t,'color','white','fontname','Verdana','fontsmoothing','off');
text(.01,4/7,t,'color','white','fontname','Segoe UI','fontsmoothing','off');
text(.01,3/7,t,'color','white','fontname','Lucida Sans Typewriter','fontsmoothing','off');
text(.01,2/7,t,'color','white','fontname','Lucida Fax','fontsmoothing','off');
text(.01,1/7,t,'color','white','fontname','Times','fontsmoothing','off');
  5 comentarios
Paul Mennen
Paul Mennen el 12 de Abr. de 2022
It's hard for me to tell for sure since your screen shots only include 16 characters, but it looks consistant with my screen captures of R2021b for both the smoothed and unsmothed fonts assuming Verdana is used for every line in your output except the 4th which is Lucida Sans Typwriter. This could happen if the other fonts specified in the script don't exist on your system. In any case none of your versions are old enough to see the effect I am talking about. To see it I believe you would need R2013b or older, or you could see it in my screen capture (https://postimg.cc/zb35vc7y). The top figure in that capture is from the older Matlab versions and as you can see, these fonts are smooth yet much crisper and look in focus compared to the other figures. Is this something I should let the Mathworks know about (or do they follow these forums)? Although it seems hard to imagine that they don't already know about this problem since pretty much everybody uses text on their plots. Perhaps the font specialists they had in 2001 left and they simply don't have the same knowledge about typefaces that they used to?
DGM
DGM el 12 de Abr. de 2022
FWIW, this is what I get in R2009b
A lot of the graphics stuff has changed since 2014. I haven't seen any clear answers to similar issues before, and I agree that it looks terrible, so maybe contacting support would be worthwhile. You might get an answer, but I don't know if you'll get a solution.

Iniciar sesión para comentar.

Categorías

Más información sobre Images en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by