MATLAB: How to disable font smoothing within a legend

font smoothingMATLAB

I want to globally disable font smoothing for all text entries within figures, since smoothed text looks very poor on my display.
I tried:
set(groot, 'DefaultTextFontSmoothing', 'off');
set(groot, 'DefaultAxesFontSmoothing', 'off');
which seems to work for xlabel(), title(), etc. but not for the text within legends.
I am using Matlab R2015a.

Best Answer

function [leg,labelhandles,outH,outM] = legend2(varargin)
% function [leg,labelhandles,outH,outM] = legend2(varargin)
% quite possibly the stupidest code i ever had to hack-up to get around a matlab stupidity.
% call 'legend2' instead of 'legend' to remove the noisy font smoothing.
% still can't figure out how to remove the graphicssmoothing, however.
% 2019may31 ~bcoe
if isempty(varargin)
help(mfilename)
return
end
[leg,labelhandles,outH,outM] = legend(varargin{:});
for ii=1:length(leg.ItemText)
leg.ItemText(ii).FontSmoothing='off';
% leg.ItemTokens(ii).graphicssmoothing='off'; %still trying to kill linesmoothing
end
call 'legend2' instead of 'legend'... (-sigh-)