Matlab Plot - Font Zapf Dingbats Will Not Render

前端 未结 1 1746
旧时难觅i
旧时难觅i 2021-01-21 02:23

I have a Matlab program where I need to include a plane icon (Zapf Dingbats 40) in the plot. Everytime I run it, it falls back to a system font.

Is there anything that

1条回答
  •  花落未央
    2021-01-21 03:02

    You may use the 'Wingdings' font for that. The following code

    text(0.5, 0.5, char(81), 'fontname', 'Wingdings', 'fontsize',50);
    

    gives

    enter image description here

    The 'ZapfDingbats' font may not be in the /Library/Font folder (but 'Wingdings' is), even if listfonts tells you that the font is there. Actually, the listfonts function adds some extra fonts to the list of the available fonts, and I don't get the rational of that.

    % always add postscipt fonts to the system fonts list.
    systemfonts = [fonts;
        {
        'AvantGarde';
        'Bookman';
        'Courier';
        'Helvetica';
        'Helvetica-Narrow';
        'NewCenturySchoolBook';
        'Palatino';
        'Symbol';
        'Times';
        'ZapfChancery';
        'ZapfDingbats';
        }];
    

    0 讨论(0)
提交回复
热议问题