2013-06-06 4 views
1

я пытался следовать этому Exemple:Сенч сборка - app.scss авария

http://extdesenv.com/theming/adding-custom-font-icons-to-sencha-touch-2-2/

Что объясняет, как настроить приложение для использования iconmoon шрифтов.

Он точно объяснил, и это не сработало. Мне далеко не все в Ruby, css или scss, поэтому это может быть глупая ошибка.

Вот сообщение об ошибке: Error Report

Вот мой config.rb файл:

# Get the directory that this configuration file exists in 
dir = File.dirname(__FILE__) 

# Load the sencha-touch framework automatically. 
load File.join(dir, '..', '..', 'touch', 'resources', 'themes') 

# Compass configurations 
sass_path = dir 
css_path = File.join(dir, "..", "css") 
fonts_path = File.join(dir,"..","fonts") 

# Require any additional compass plugins here. 
images_dir = File.join(dir, "..", "images") 
output_style = :compressed 
environment = :production 

Вот мой app.scss файл

@import 'sencha-touch/default'; 
@import 'sencha-touch/default/all'; 

@include icon-font('Test', inline-font-files(
    'Test/Test.woff', woff, 
    'Test/Test.ttf', truetype, 
    'Test/Test.svg', svg 
)); 

@include icon("airplane", "t", "Test"); 

И это мой каталог Directory

Обратите внимание, что используемый значок значка находится в папке «Шрифт» папки «Ресурсы».

ответ

1

Кто-то просто ответил на мой вопрос на другом форуме.

Ответ

Поместите iconmoon шрифт в папку Ressources/Sass/стилей/шрифта Не изменяйте config.rb Добавить эти строки в app.scss с правильным Fontname

//Load font 
@include icon-font('FontName', inline-font-files('fontname/fontname.woff', woff, 'fontname/fontname.ttf', truetype,'fontname/fontname.svg', svg)); 

//Generate icon's class 
@include icon('cps-icon-arrow-right','CHARACTERSelected','FontName'); 
............. 
Смежные вопросы