我正在尝试将自定义字体图标添加到我的 sencha 架构师项目中,并删除不必要的主题类,但似乎 Sencha Architect 根本不使用 app.scss(位于我项目的资源/sass 文件夹中)。我所做的更改既没有应用在架构师中,也没有在我启动应用程序时应用。
应用程序.scss
$include-pictos-font:
false; $include-default-icons: false;
@import 'sencha-touch/default';
@import'sencha-touch/default/src/Class';
@include icon-font('CustomFont', inline-font-files(
'customFont/customFont.woff', woff, 'customFont/customFont.ttf',
truetype, 'customFont/customFont.svg', svg ));
@include icon("map" , "e600", "CustomFont"); @include
icon("check_filled", "e602", "CustomFont");
顺便提一下,我确实将 scss 文件编译为 css,它编译得很好。
有人可以详细说明吗?
我在用:
- 煎茶架构师 3.0.2.1375
- 命令:4.0.2.67
- 框架:Sencha Touch 2.3.x
更新:
事实证明,由于主题原因,Architect 不使用 app.scss 文件(请参阅 Phill 的帖子)。当我尝试插入图标字体时,确实出现了另一个问题。找不到字体文件。原因在以下帖子中提到:http ://www.sencha.com/forum/showthread.php?280895-How-to-correct-the-Font-theming-in-Architect3
下面的代码解决了这个问题,我现在可以愉快地使用我的新图标字体了:
$font-files:
url('../resources/sass/stylesheets/fonts/bla/bla.woff') format("woff"),
url('../resources/sass/stylesheets/fonts/bla/bla.ttf') format("truetype"),
url('../resources/sass/stylesheets/fonts/bla/bla.svg') format("svg");
@include icon-font('IcoMoon', $font-files);
@include icon("map" , "\e600", "IcoMoon");
@include icon("check_filled", "\e602", "IcoMoon");
要明确。我在 Architect(一个 scss 资源)的主题中添加了一个文件,并添加了上述代码。