2

tinyMCE で theme_advanced_fonts を使用して新しいフォントを追加しましたが、機能しません。

他のすべてのフォントは機能します。それを選択して結果を確認できますが、新しいフォントを使用すると、テキストがこのフォントにある場合、良い結果が表示されますが、tinyMCE でこのフォントを選択できます。

私のコードは次のとおりです。

$('.screen-textarea').tinymce({
                        script_url : '<?php echo base_url(); ?>assets/js/tiny_mce/tiny_mce.js',

                        mode : "textareas",
                        theme : "advanced",
                        plugins : "style,inlinepopups",

                        theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,forecolor,fontselect,fontsizeselect",
                        theme_advanced_buttons2 : "",
                        theme_advanced_toolbar_location : "bottom",
                        theme_advanced_toolbar_align : "left",
                        theme_advanced_statusbar_location : "bottom",
                        theme_advanced_resizing : true,
                        theme_advanced_fonts : "ChildsPlay=ChildsPlay;"+"Academy Engraved LET=Academy Engraved LET;"+"American Typewriter=American Typewriter;"+"Arial=Arial;"+"Bradley Hand=Bradley Hand;"+"Chalkduster=Chalkduster;"+"Copperplate=Copperplate;"+"Courier=Courier;"+"Futura=Futura;"+"Georgia=Georgia;"+"Helvetica Neue=Helvetica Neue;"+"Marker Felt=Marker Felt;"+"Noteworthy=Noteworthy;"+"Optima=Optima;"+"Papyrus=Papyrus;"+"Party LET=Party LET;"+"Snell Roundhand=Snell Roundhand;"+"Times New Roman=Times New Roman;"+"Verdana=Verdana;"+"Sanchez=Sanchez;",
                        theme_advanced_font_sizes : "12px,15px,18px,22px,25px,29px,35px,41px,48px,51px,59px,66px,73px,78px,84px,88px,90px",
                        theme_advanced_text_colors : "C2C2C2,FFFFFF,000000,1c2977"
                    });

フォントが機能しないのは Sanchez です。私はこのフォントを私のコンピュータに持っています。

4

2 に答える 2

0

おそらく、このフォントはエディターの iframe に読み込まれていません。このフォントをロードするには、content_css tinymce config パラメータを使用して次のコードを (必要に応じて変更して) 追加します。

@font-face {
    font-family: "your_font";
    font-style:  normal;
    font-weight: normal;
    src: url("http://your_server/font_directory/your_font.ttf");
}
于 2013-04-24T08:35:12.957 に答える