Hi,
So currently we have a Rails 4.1 application using sass-rails, call it ProjectX. Within ProjectX there is a “design” folder where we keep the html/css for the frontend design. We also have the ProjectX/app/assets/ with subdirectories fonts/, javascripts/, images/, and stylesheets/ . In our design folder, we have scss files like this:
@font-face {
font-family: ‘HDVPeace’;
src: font-url(‘HDV_Peace.eot’);
src: font-url(‘HDV_Peace.eot?iefix’) format(‘eot’),
font-url(‘HDV_Peace.woff’) format(‘woff’),
font-url(‘HDV_Peace.ttf’) format(‘truetype’),
font-url(‘HDV_Peace.svg#webfont’) format(‘svg’);
}
But when I compile the sass to css for use with Rails, I have to change the newly generated scss file (by hand) to use the assets directory:
@font-face {
font-family: ‘HDVPeace’;
src: url(‘/assets/HDV_Peace.eot’);
src: url(‘/assets/HDV_Peace.eot?iefix’) format(‘eot’),
url(‘/assets/HDV_Peace.woff’) format(‘woff’),
url(‘/assets/HDV_Peace.ttf’) format(‘truetype’),
url(‘/assets/HDV_Peace.svg#webfont’) format(‘svg’);
}
Is there a way to avoid this manual step? If I didn’t do it, then the designer would have to remember to change it themselvers. It seems like wasted effort if I have to keep “separate” font paths. I would think there would be a way to automate this…