%
%   This functions changes all fontsizes and weight ina figure 
%
function a = ChangeTextStyle(fig,myfontsize,myfontweight)

set(0,'ShowHiddenHandles','on')

h = findobj(fig,'type','text');
for g = h
    set(g,'FontSize',myfontsize,'FontWeight',myfontweight)
end

h = findobj(fig,'type','axes');
for g = h
    set(g,'FontSize',myfontsize,'FontWeight',myfontweight)
end

set(0,'ShowHiddenHandles','off')
a = 0;