0

在将默认字体更改为我自己的自定义字体(如 Arial 或 times new roman)时遇到问题。我已按照教程进行操作,但无法获得。我已经更改了默认主题,但无法更改默认字体。这是供您参考的代码小片段。应用程序.scss:

    $base-color: #9284b5; // this worked
    $base-gradient: glossy; // this worked
    $include-default-icons: false;
    $font-family: '../fonts/Candara.ttf'; // this didn't work
   //$font-family:Arial; // this didn't work 
    // The following two lines import the default Sencha Touch theme. If you are building
    // a new theme, remove them and the add your own CSS on top of the base CSS (which
    // is already included in your app.json file).
    @import 'sencha-touch/default';
    @import 'sencha-touch/default/all';

    // Custom code goes here..
    @import 'sencha-touch/default/src/Button';
    @import 'sencha-touch/default/src/Class';
    @import 'sencha-touch/default/src/Button';
    @import 'sencha-touch/default/src/Panel';
    @import 'sencha-touch/default/src/Sheet';
    @import 'sencha-touch/default/src/MessageBox';
    @import 'sencha-touch/default/src/Toolbar';
    @import 'sencha-touch/default/src/carousel/Carousel';
    @import 'sencha-touch/default/src/form/Panel';
    @import 'sencha-touch/default/src/form/FieldSet';
    @import 'sencha-touch/default/src/field/Field';
    @import 'sencha-touch/default/src/field/Checkbox';
    @import 'sencha-touch/default/src/field/Radio';
    @import 'sencha-touch/default/src/field/Search';
    @import 'sencha-touch/default/src/field/Select';
    @import 'sencha-touch/default/src/field/Slider';
    @import 'sencha-touch/default/src/field/Spinner';
    @import 'sencha-touch/default/src/field/TextArea';
    @import 'sencha-touch/default/src/dataview/IndexBar';
    @import 'sencha-touch/default/src/dataview/List';
    @import 'sencha-touch/default/src/picker/Picker';
    @import 'sencha-touch/default/src/plugin/ListPaging';
    @import 'sencha-touch/default/src/plugin/PullRefresh';
    @import 'sencha-touch/default/src/slider/Slider';
    @import 'sencha-touch/default/src/slider/Toggle';
    @import 'sencha-touch/default/src/tab/Panel';

    // Examples of using the icon mixin:
    // @include icon('user');

我正在使用 Sencha touch ver: 2.2.0 sencha cmd: 3.1.0.256。任何人都可以帮我吗?谢谢。

4

1 回答 1

1

升级到 Sencha Touch 2.2.1 即可解决此问题。

于 2013-06-28T12:53:22.707 回答