Believe it or not, the classic symbol for getting “help” — a question mark within a circle — is not a Unicode character. However, it is a character in Font Awesome 4.7, a free font collection. So including a button using that symbol for help on my admittedly complex search pages seemed a simple enough task.
After false starts that included making a Drupal subtheme — which involved creating a *.libraries.yml file to put the font’s location into, and then a *.info.yml file,1 to tell Drupal about the library2 — and after that failed, installing and then uninstalling the Asset Injector and then the Font Awesome modules, I finally bethought myself to do what I already knew how to do, having done it for Cabin and Crimson Pro, my text fonts: Download the font, upload it to my server, and then make the proper declarations in my CSS stylesheet.
This approach was suggested by W3Schools, whose code I paste in below. Works there, and now here. The red is the house style for rubrics:
fa fa-question-circle
Used on a button:
Unicode:
NOTES
1 YAML (*.yml) is in essence a text format for defining key-value pairs, ideal for configuration files. YAML syntax is documented, and even parseable. However, at least on my host, there is no YAML equivalent for the CSS editor where errors are highlighted in real time as one works on a file; and there is no parser that understands the semantics of YAML as instantiated by Drupal, except in the sense that Drupal barfs a PHP error and chokes to death when it encounters something unexpected. Hence, in a dynamic and imperfectly documented programming environment, writing YAML files is closer to trial and error than might be considered welcoming by a humble site developer who [snarl] just wants to add an effing question-mark-in-a-circle character as a clickable icon in a cobbled-together replacement for the user-facing help system Drupal had ten years ago but apparently no longer has (and if I’m wrong, please contact me) MR SUBLIMINAL And then move on to blogging. “YAML Ain’t Markup Language.” No kidding, dudes. Everything Ain’t Witty Recursion.
2 There are times when working with Drupal feels like navigating an extremely cumbersome and even Dickensian bureaucracy.

Add new comment