Closed Bug 1547931 Opened 6 months ago Closed 5 months ago

Enable MOZ_BUNDLED_FONTS for Thunderbird


(Thunderbird :: Build Config, task)

Not set


(Not tracked)

Thunderbird 68.0


(Reporter: Paenglab, Assigned: Paenglab)




(2 files)

Bug 1514869 added a shared fonts list Thunderbird could also use. For this TB needs to have enabled the MOZ_BUNDLED_FONTS variable.

The MOZ_BUNDLED_FONTS option doesn't really have any relation to the new (not-yet-preffed-on) font-list work in bug 1514869. The fact that the code there failed to compile without it was simply a bug, now fixed.

MOZ_BUNDLED_FONTS itself dates back to bug 998844, originally targeted at b2g emulation, and later also used for the emoji font in bug 1231701. I don't know if Thunderbird makes use of this at all? Offhand I'm not seeing any such "bundled fonts" in the repository (but perhaps I'm not looking in the right place).

So whether this is appropriate/useful really depends on what the Thunderbird product wants to package and ship. The option is pointless (and marginally harmful, in that it causes extra work to be done at during startup) unless font files are actually being shipped in the /fonts/ directory of the installed product. I don't know whose responsibility it is to make decisions like that for TB?

Also, this is really a Thunderbird build config issue, not a Core bug; moving to that component.

Component: Layout: Text and Fonts → Build Config
Product: Core → Thunderbird

comm/mail/moz.configure already sets MOZ_BUNDLED_FONTS to True on Windows and Linux builds, and I see that we include the emojoi font(s) referenced above.

So I'm not sure I understand the issue?

Flags: needinfo?(richard.marti)

Jonathan, we followed the two old bugs and we have the TwemojiMozilla.ttf in /fonts like FX has. All I can say is, that without the patch TB doesn't build (it will build with bug 1547914 landed but then the MOZ_BUNDLED_FONTS seems not to be enabled). And with bug 1547914 comment 5 enabling it with the comman line option seems not to work.

Flags: needinfo?(richard.marti)

Just curious, where does TB have the emoji font? I don't see any /fonts/ directory under, what am I missing?

Once the bug-fix in bug 1547914 is landed, the recent font-list changes in bug 1514869 shouldn't have any effect on whether MOZ_BUNDLED_FONTS is enabled or not, AFAIK. That's purely a question for the config/build system. It looks like what's currently there in toolkit/moz.configure has been that way since bug 1491419, so I wonder if that's where MOZ_BUNDLED_FONTS got disabled for TB?

We get it with this line

Rob, can you check if and why MOZ_BUNDLED_FONTS is disabled for TB?

Flags: needinfo?(rob)

(In reply to Richard Marti (:Paenglab) from comment #7)

We get it with this line

Aha, thanks! I just hadn't looked in quite enough detail. :)

We set a CONFIG value with set_config(MOZ_BUNDLED_FONTS). That's enough for the emoji fonts to get included it looks like. That's not the same as a DEFINE, which I cannot override due to the way the code is written in toolkit/moz.configure.

So I think the answer is we never did set_define(MOZ_BUNDLED_FONTS).

Flags: needinfo?(rob)

Jonathan, according to comment 9 we can't override the DEFINE, so do you agree the with the way of the patch to define it?

Flags: needinfo?(jfkthame)

So if I'm understanding this, the Thunderbird product has been including the emoji font in the package (on Windows and Linux), but the code in gfx/thebes to load that font was never actually enabled? That's a bit unfortunate, but never mind - time to move on. The moz.configure change seems reasonable, then, to finally allow this feature to work as intended in TB.

Flags: needinfo?(jfkthame)

After that lands, the code we have in comm/mail/moz.configure won't be needed, correct? I'll spin off a separate bug to address if that's the case.

Because I added the patch with the Phab web-UI here the patch for easier check-in.

Assignee: nobody → richard.marti
Keywords: checkin-needed

Aryx, please can you land this patch?

Flags: needinfo?(aryx.bugmail)

Pushed by
Enable the MOZ_BUNDLED_FONTS variable for Thunderbird too. r=jfkthame CLOSED TREE

Keywords: checkin-needed
Flags: needinfo?(aryx.bugmail)
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 68.0
You need to log in before you can comment on or make changes to this bug.