font-family-icon doesn't show on button bar, but font-size icon does...

37 views
Skip to first unread message

Richard de Rozario

unread,
Apr 26, 2020, 7:48:44 PM4/26/20
to Etherpad Developers
Hi,
I've got a strange anomaly where the icon for font-family (ep_font_family) doesn't show (I get a 'missing graphic' box), but the icon for font-size (ep_font_size) shows fine.  I've looked through the code of each plugin, but it seems very comparable.   I've tried uninstall/install of the plugin, as well as different browsers on both Windows and Linux -- nothing seems to restore the icon.

So, I tried to find something in the source code.  However, I cannot exactly figure out where the code gets the icon definition from.  All I can find is styling on, for example, `.font_size_icon` and a class like "acl_write font_size_icon".   But where is the actual button icon image defined?   

cheers,

RdR

Richard de Rozario

unread,
Apr 28, 2020, 2:47:03 AM4/28/20
to Etherpad Developers
OK, so I found my own answer.

The button icon in, for example, `ep_font_family` is defined in `etherpad-lite/node_modules/ep_font_family/templates/editbarButtons.ejs` towards the bottom where it defines a css class `.ep_font_family > a > .buttonicon:before`   The entry that says `content:"\e81b";`  defines the icon as a code of the fontawesome-etherpad font, which itself is defined in `etherpad-lite/src/static/font/`

The problem is that the current version ep_font_family uses a code (e81b) that doesn't exist in the current version of the font file.  As a simple expedient, I changed the code to `\e84e`  which is the code for the "font" glyph -- which does exist in fontawesome-etherpad.  Alternatively, we could define a new glyph using the instructions here: https://github.com/ether/etherpad-lite/wiki/Adding-a-new-font-icon-to-fontawesome-etherpad

Now, onto the next problem, which is that the font-family dropdown doesn't seem to have the right z-index...

cheers,

RdR

On Monday, 27 April 2020 09:48:44 UTC+10, Richard de Rozario wrote:
...I cannot exactly figure out where the code gets the icon definition from.  ...

John McLear

unread,
May 6, 2020, 2:27:03 PM5/6/20
to Etherpad Developers
tnx for letting me know, will fix today.
Reply all
Reply to author
Forward
0 new messages