How do I add an icon to bbb-icons.woff

273 views
Skip to first unread message

James MacLean

unread,
Dec 4, 2019, 12:03:23 PM12/4/19
to BigBlueButton-dev
Good afternoon,

Decided to attempt a new annotation. Copied triangle to make a right triangle. New tool actually appears to work. Used original triangle icon.

Appears I need to add a new 'right triangle' icon  to bbb-icons.woff. Looks like I should be able to figure this out as I see no one asking about doing this anywhere.

With my head down, how does one add a new icon to the WOFF file?

Thanks,
JES

Chad Pilkey

unread,
Dec 4, 2019, 12:54:22 PM12/4/19
to BigBlueButton-dev
You could get a font editing program and edit the main icon font, but I'm not sure if that's the best method. I think it would probably be easier for you going forward if you created a new file with just your icons and then hooked it all up in the same way that the we do the current icons. A separate file will make carrying your changes forward a lot easier.

Also, if you use the recordings at all you'll need to add drawing code to the playback so it knows how to render the new shape.

James MacLean

unread,
Dec 4, 2019, 7:05:11 PM12/4/19
to BigBlueButton-dev
Thanks a bunch for the advice Chad.

Yes, we do want to be able to connect new annotations to recordings. Where would I look for directions on adding that? 

I copied triangle -> righttriangle in record-and-playback/presentation/scripts/publish/presentation.rb in two places and ran ./deploy.sh. Even on a new recording the right triangles remain missing :(.

JES

James MacLean

unread,
Dec 5, 2019, 5:26:05 AM12/5/19
to BigBlueButton-dev
With the changes to record-and-playback/presentation/scripts/publish/presentation.rb, at least the log suggests BBB is seeing the annotation:

Draw 27 Shape 3 ID w_1yhhrsussfen-3-1575540543352 Type righttriangle

Chad Pilkey

unread,
Dec 5, 2019, 1:28:00 PM12/5/19
to BigBlueButton-dev
You might need to put some comments in to make sure that everything is formatted the same for the shape attributes. I would also create a short recording with just a normal triangle and your new right-triangle and then you can run "bbb-record --rebuild <meetingId>" to test your processing changes a little quicker". In particular I would look for the path and stroke parts, and then also that the svg_render_shape_righttriangle function is getting called.

James MacLean

unread,
Dec 6, 2019, 7:00:11 AM12/6/19
to BigBlueButton-dev
Hi Chad,

I can confirm that when drawing the new annotation, everyone see it.

If I remove the annotation type from record-and-playback/presentation/scripts/publish/presentation.rb, I get the log entry of :

"Ignoring unhandled shape type righttriangle"

If I update the original triangle entry in record-and-playback/presentation/scripts/publish/presentation.rb, the playback confirms I made a change.

If I enable the type righttriangle in  record-and-playback/presentation/scripts/publish/presentation.rb, by simply making a copy of the triangle code, I no longer get the "Ignoring unhandled" log entries, and I do get log entries referencing righttriangle, but, the playback still shows it as invisible.

Sorry, I'm new to debugging this environment and I am not getting any new ideas :). 

For now I make the changes and just keep running "bbb-record --rebuild <meetingId>" , waiting for it to complete,  then open in a guest Chrome window to test as you have suggested.

JES

Chad Pilkey

unread,
Dec 6, 2019, 12:12:59 PM12/6/19
to BigBlueButton-dev
I'm not sure about all the places that you've edited, but there's a third spot that I just found where the triangle shape is referenced. The colour and thickness is decided here, https://github.com/bigbluebutton/bigbluebutton/blob/master/record-and-playback/presentation/scripts/publish/presentation.rb#L648-L650

James MacLean

unread,
Dec 6, 2019, 2:26:24 PM12/6/19
to BigBlueButton-dev
Chad,

Bingo! Thanks and thanks again. Right angle triangles are now playing back as expected.I've finally been able to see a new annotation from beginning to end.

With such isight, would you now explain how I missed that obvious line of code after working on that file way too many times over the last couple of days :) ?

All the best,
JES

Chad Pilkey

unread,
Dec 6, 2019, 2:30:34 PM12/6/19
to BigBlueButton-dev
I missed it on my first look also. Had to go and walk through the full path. I'm glad it's working now.

James MacLean

unread,
Dec 10, 2019, 5:44:22 AM12/10/19
to BigBlueButton-dev
I wanted to feed back on the bbb-icons.woff file update part. Looking at how the BBB icon code is structured, it appeared to be more involved for myself to insert the code to point to a single new icon file for the new tool. Instead, i used fontforge, copied the existing triangle glyph to a free element and rotated it a bit. It's not quit a right triangle, but, it stands out as a different tool now. 

Thanks for the help everyone in guiding me to learning how to add a new tool even though it was mostly a copy of the current triangle ;).

JES
Reply all
Reply to author
Forward
0 new messages