Hi, I am currently using:
Icon API: 7.x-1.0-beta5+4-dev
Fontello: 7.x-1.0+1-dev
I started with the stable releases, but switched to the dev versions after I encountered issues.
I installed Icon API and Fontello. I ensured that the icons path matched the directory. I created a font bundle at fontello and downloaded it. I imported that package into drupal using the admin menu. The package imports correctly, and if I click "view Icons," it shows my icons correctly. I used inspect element to ensure I was getting the proper markup and copied that. Then I created a test node and pasted the markup there. The icons display properly in the admin menu, but not on the node. I tested other icon fonts I have installed on the site, and those inculded with Icon API (Fontawesome, Lullacons, and bootstrap glyphicons included with the bootstrap 3 theme). All of those work properly. I get vastly different styles on the admin them than I do on the node.
Markup from admin page:
element.style {
}
testmedia="all"
.icon.fontello {
background: none;
display: inline-block;
height: inherit;
line-height: inherit;
margin: 0;
padding: 0;
vertical-align: inherit;
width: auto;
}
testmedia="screen"
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, input, select, textarea, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, td.menu-disabled, ul.links, ul.links.inline, ul.links li, .block ul, div.admin, tr.even, tr.odd, tr.drag, tbody, tbody th, thead th, .breadcrumb, .item-list .icon, .item-list .title, .item-list ul, .item-list ul li, ol.task-list li.active, .form-item, tr.odd .form-item, tr.even .form-item, .form-item .description, .form-item label, .form-item label.option, .form-checkboxes, .form-radios, .form-checkboxes .form-item, .form-radios .form-item, .marker, .form-required, .more-link, .more-help-link, .item-list .pager, .item-list .pager li, .pager-current, .tips, ul.primary, ul.primary li, ul.primary li a, ul.primary li.active a, ul.primary li a:hover, ul.secondary, ul.secondary li, ul.secondary a, ul.secondary a.active, .resizable-textarea {
margin: 0;
padding: 0;
border: 0;
vertical-align: baseline;
}
user agent stylesheeti, cite, em, var, address, dfn {
font-style: italic;
}
Pseudo ::before element
testmedia="all"
.icon-thermostat:before {
content: '\e802';
}
testmedia="all"
[class^="icon-"]:before, [class*=" icon-"]:before {
font-family: "test";
font-style: normal;
font-weight: normal;
speak: none;
display: inline-block;
text-decoration: inherit;
width: 1em;
margin-right: .2em;
text-align: center;
font-variant: normal;
text-transform: none;
line-height: 1em;
margin-left: .2em;
}
Inherited from div#page
testmedia="screen"
#page {
padding: 20px 0 40px 0;
margin-right: 40px;
margin-left: 40px;
background: #fff;
position: relative;
color: #333;
}
Inherited from div#overlay-content.clearfix
testmedia="all"
#overlay-content {
background: #fff;
clear: both;
color: #000;
padding: .5em 1em;
position: relative;
}
Inherited from body.html.not-front.logged-in.no-sidebars.page-admin.page-admin-config.page-admin-config-media.page-admin-config-media-icon.page-admin-config-media-icon-bundle.page-admin-config-media-icon-bundle-test.overlay
testmediaMarkup from the node:
element.style {
}
testmedia="all"
[class^="icon-"], [class*=" icon-"] {
display: inline-block;
width: 100%;
background: none;
display: inline-block;
height: inherit;
line-height: inherit;
margin: 0;
padding: 0;
vertical-align: inherit;
width: auto;
}
testmedia="all"
*, ::before, ::after {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
user agent stylesheeti, cite, em, var, address, dfn {
font-style: italic;
}
Pseudo ::before element
testmedia="all"
*, ::before, ::after {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
Pseudo ::after element
testmedia="all"
*, ::before, ::after {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
Pseudo element
testmedia="all"
::selection {
background-color: #4484c7;
}
testmedia="all"
::selection {
color: #ffffff;
}
Inherited from body.html.not-front.logged-in.no-sidebars.page-node.page-node-.page-node-45.node-type-page.admin-menu
testmedia="all"
body {
color: #444;
font-family: 'Open Sans',sans-serif;
font-size: 14px;
line-height: 160%;
}
testmedia="all"
body {
font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
font-size: 14px;
line-height: 1.428571429;
color: #333333;
background-color: #ffffff;
}
Inherited from html.js
testmedia="all"
html {
font-size: 62.5%;
-webkit-tap-highlight-color: rgba(0,0,0,0);
}
testmedia="all"
html {
font-family: sans-serif;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
}I am currently using the "bootstrap business" theme, and am using fontawesome icons on the site. I want to add some custom icons to the site. If there are any other ideas on how to implement that I'm happy to hear.
Comments
Comment #1
yohan31 commentedAny ideas here? Am I doing something wrong?
Comment #2
yohan31 commentedI also used simpltestme to run the demo and try to import fontello icons. It doesn't work there either.
Comment #3
yohan31 commentedI'm looking in the fontello.fix.css file and it appears to contain the markup that is missing from my site to make the contents work. Maybe it's not being applied correctly? Where is that diff supposed to go? On my main style sheet?
Comment #4
yohan31 commentedI am using the business bootstrap theme. I applied the info from fontello.fix.css to bootstrap.css in the theme. Now I am getting the following markup when I try to invoke an icon on a page. Now at least it's got some of the same markup that comes from the admin page. This is better than what I was getting, but the icon is still not rendering.
Comment #5
yohan31 commentedOn this diff: http://cgit.drupalcode.org/fontello/commit/?id=263797d
It shows:
That markup was supposed to come out somehow, but it's still showing up on my inspect element. Where does that need to come out? Maybe that's what's keeping the icons from rendering?
Comment #6
yohan31 commentedYou'll have to excuse me. I'm no better than a rote hacker but I think I'm figuring this out? I just realized that fontello.fix.css is supposed to be added to some of the css in the font bundle downloaded from fontello, right? However, I cannot figure out where it's supposed to go, and it does not look like it's getting added properly. I've checked the css files and can't find anything in there with the code from fontello.fix.css. Where is it supposed to go?
Comment #7
yohan31 commentedDoing some more looking - this is more clear on simplytest because my host uses computed style sheets so it's tough to get to which style sheet. Anyway, looking at the demo on simplytest, it shows that in the admin menu, the site is going to fontello.fix.css for the style sheet, but on the regular page, it's going to style.css instead.
Here is the markup I get from the page on simplytestme:
Here's the markup I get from the admin page on simplytestme:
Comment #8
yohan31 commentedI don't know for sure, but this is what it looks like to me. I think that maybe it's not passing this bundle check in fontello_process_attached($bundle_name), and returning instead of attaching fix.css
edit: removed unnecessary code
Comment #9
markhalliwellHonestly, I am not entirely sure what is going on here. I am about to board a flight for DrupalCon Amsterdam. I will see if I cannot take a look in the next couple of weeks.
Also, this module isn't "depreciated" nor is it really that acceptable to contact someone directly because they haven't responded in a few days. It is quite possible the zip produced from fontello no longer works with the module, I'll just have to take a more detailed look when I have the time.
Comment #10
yohan31 commentedThe simplytestme platform has about 8 minutes left:
http://s92cdc0215596de8.s3.simplytest.me/
u: admin
p: admin
Comment #11
yohan31 commentedOk sorry - didn't really know the rules on that - still fairly green.