Thank you very much for your example, Blake! I finally had time to try
it this morning and updated my work-in-progress addon to work with
Firefox nightly:
https://github.com/fred-wang/MissingFontsNotifier/commit/0d81595726c9af0a088a2296030e78d751043f6f
> In
> your observer, you'll probably want to grab one of the message managers
> (possibly the global one?) to communicate with the parent process instead of
> simply logging to the console.
I was not sure how to use the global message manager from the JSM (I got
an error when trying to create one). Instead I used the child/parent
process message manager, as suggested on MDN:
"The JSM can then use the child process message manager to exchange
messages with the parent process message manager."
>
> Also, if you're writing code for the browser, you'll be able to avoid having
> to write some of the skeleton stuff that I had to add (since the browser
> already registers all of its components and resources).
>
Currently, on desktop I only plan to do an add-on
(and perhaps Linux maintainers can make bundle it in a package as
discussed on
https://bugzilla.mozilla.org/show_bug.cgi?id=467729).
On mobile platform, it would be interesting to have it directly in the
browser code. Jonathan Kew started to write a patch for Android:
https://bug648548.bugzilla.mozilla.org/attachment.cgi?id=8520633
However, last time I tried, it didn't seem to work anymore. Perhaps it's
the same issue as the one I experimented on Desktop. What would be the
way to properly register "font-needed" observer, here?
--
Frédéric Wang
maths-informatique-jeux.com/blog/frederic