Notes |
|
(0001411)
|
Sprow
|
2016-10-09 19:58
|
|
Spotted this in the log:
(0.640000) frontends/riscos/font.c:120 nsfont_init: Initialise RUfl
(2.180000) frontends/riscos/font.c:124 nsfont_init: rufl_init: rufl_FONT_MANAGER_ERROR: 0x21e: /Default encoding not found
(2.180000) frontends/riscos/gui.c:2124 die: The Unicode font library could not be initialized. Please report this to the developers. |
|
|
(0001414)
|
Sprow
|
2016-10-27 19:37
|
|
Extra data point, since this is a Risc PC, if I softload RISC OS 5 NetSurf starts correctly (ie. with the same !Fonts) but with RISC OS 4.02 the above error happens. Presumably some difference in behaviour between the two font managers? |
|
|
|
Unfortunately as this is a RISC OS specific issue and we currently have no active RISC OS developer we cannot guarantee a timely response to this issue. |
|
|
(0001538)
|
Sprow
|
2017-04-11 15:54
|
|
Just tried this again with 3.7 CI#4060, but it still errors.
Having had a quick look at rufl_init() there are only 11 places where it can return rufl_FONT_MANAGER_ERROR.
I think the key piece of information (which I don't appear to have mentioned before, sorry) is that it's Font Manager 3.71. This seems to be key. If I go back to the ROM based Font Manager (3.40) then the RUFL cache is generated. I can then reboot so I'm back with Font Manager 3.71 again and the cache is loaded OK.
I can see in rufl_init.c there's all kinds of logic to work out which API to use. It would seem the non-unicode case is tripping up requesting the /Default encoding for some reason, which is presumably skipped entirely on old font managers. |
|
|
|
Please try again with CI build 4300 or later, and attach the log file. Thanks. |
|
|
(0001717)
|
Sprow
|
2018-01-21 16:06
|
|
Updated log attached (from CI #4303 as it happens). |
|
|
|
OK, so xfont_find_font("MathPhys.Italic\ELatin1", 160, 160, 0, 0, &font, 0, 0) succeeds and returns a font handle.
However, calling xfont_scan_string(font, " ", font_RETURN_BBOX | font_GIVEN_FONT | font_GIVEN_LENGTH | font_GIVEN_BLOCK, 0x7fffffff, 0x7fffffff, &block, 0, 1, 0, &x_out, &y_out, 0) fails as the /Default encoding can't be found.
I don't happen to have MathPhys.Italic to hand, but I expect it's a symbol font (i.e. has Outlines and IntMetrics files, rather than IntMetric<N> and has no Encoding file of its own). With the Unicode FontManager (which you appear to be softloading, this causes the FontManager to attempt to load the /Default encoding from Font:Encodings./Default. This is present in the ROMFonts module on RISC OS 5. I suspect, however, it's not present in the RISC OS 4 ROMFonts module (and I also expect that you're not softloading the RISC OS 5 ROMFonts module).
So, you probably want to stick https://www.riscosopen.org/viewer/view/castle/RiscOS/Sources/Video/Render/Fonts/ROMFonts/Fonts/Encodings/_Default?rev=1.1;content-type=text%2Fplain;hideattic=0 in !Fonts.Encodings (or softload the RISC OS 5 ROMFonts module).
We can probably make RUfl ignore this font completely in the case where the encoding can't be loaded, but that's a sticking plaster, not a fix. |
|
|
|
If you can test with 4304 or later and post the log file, that'll help. It should probably work "fine", as I've made it ignore the lack of encoding file when attempting to read the font. |
|
|
|
Actually, make that 4305 or later -- 4304 only covered half the wound. |
|
|
(0001724)
|
Sprow
|
2018-01-21 21:21
|
|
You're right MathPhys is a symbol font, it comprises 5 files
MathPhys.Encoding MathPhys.IntMetrics MathPhys.Outlines
MathPhys.Italic.IntMetrics MathPhys.Italic.Outlines
and comes as part of TechWriter. You're right there's no /Default in my Encodings directory.
I notice NetSurf adds to Font$Path so I was able to get rid of the error with CI #4303 by just putting an Encodings./Default alongside the NSSymbol inside !NetSurf.Resources.
I also tried CI #4305 (having removed the /Default file) and that also got rid of the error - success!
So it seems there's two ways out:
a) add a Encodings./Default
b) swallow the error in RUfl |
|
|
|
Thanks.
The underlying issue here is that you're attempting to use a Unicode-capable FontManager without a corresponding ROMFonts module.
When non-Unicode-capable FontManagers deal with symbol fonts, they will use the Encoding file in the font directory, if present, or default to assuming a 1:1 mapping between glyph index and codepoint. The Unicode FontManager behaves differently in the latter case: it relies on there being a /Default encoding to map between glyph index and codepoint (full details can be found in $2.3 of https://www.riscosopen.org/wiki/documentation/show/UCS%20Font%20Manager)
It is also worth noting that RUfl decides that the FontManager in this case is not Unicode-capable. The reason for this is that the test it uses to determine Unicode-awareness is to call XFont_FindFont with "Homerton.Medium\EUTF8" -- if this fails, then it decides it's dealing with a non-Unicode-capable FontManager. For this test to work, the Unicode FontManager requires the presence of a UTF8 encoding file. This is found in the ROMFonts module, too, so is also missing here.
We're not going to add these encoding files to the NetSurf distribution as they belong to the FontManager/ROMFonts combination -- they're not specific to NetSurf (or RUfl), and we assume that OS components are installed correctly. While I've made RUfl more tolerant of mismatched FontManager/ROMFonts, it's not a real fix (as the net effect is that all symbol fonts with no explicit Encoding file will be ignored). |
|
|
(0001728)
|
Sprow
|
2018-01-22 08:41
|
|
I think the extra robustness in RUfl will catch casual FontManager soft loaders (it's been long enough that I've now forgotten why I was softloading it on the Risc PC, probably something for !Pluto email) from falling, and I can add an updated ROMFonts to do it properly.
Thanks for investigating. Good to close. |
|
|
|
Thank you for your report, this has been resolved in the 3.8 release |
|