non-Unicode symbol fonts do not work on Windows. Bug 165665. Do we need the flag USE_PANGO_WIN32 ?
ref : https://bugs.launchpad.net/inkscape/+bug/165665
I believe this bug can be fixed by disabling the flag USE_PANGO_WIN32 in line 19 of src/libnrtype/FontFactory.h. When I do this on Windows XP, I gain about 35 new fonts. Not all of these new fonts are useable, but the most interesting ones, such as CommercialPi, Symbol, Technic, Webdings, Wingdings, MonoType Sorts, TechnicLite are working well, both in Inkscape and in IE9. This is a Windows-specific bug which hides symbol fonts, and does not occur in Gimp 2.6 on Win XP. As far as I can tell, the Gimp source code does not contain any analogue or equivalent of the flag USE_PANGO_WIN32. Would there be any objection if I disable this flag, or does it serve a specific purpose that is essential?
tia - Alvin Penner
On 2011-11-12 at 21:57, Alvin Penner wrote:
I believe this bug can be fixed by disabling the flag USE_PANGO_WIN32 in line 19 of src/libnrtype/FontFactory.h. When I do this on Windows XP, I gain about 35 new fonts. Not all of these new fonts are useable, but the most interesting ones, such as CommercialPi, Symbol, Technic, Webdings, Wingdings, MonoType Sorts, TechnicLite are working well, both in Inkscape and in IE9. This is a Windows-specific bug which hides symbol fonts, and does not occur in Gimp 2.6 on Win XP. As far as I can tell, the Gimp source code does not contain any analogue or equivalent of the flag USE_PANGO_WIN32. Would there be any objection if I disable this flag, or does it serve a specific purpose that is essential?
I put that in (several years ago) because of a large number of problems encountered trying to use fontconfig on win32. From memory, these included:
- Extremely slow application startup (with no visual feedback) on systems with a non-trivial number of fonts installed
- Lack of access to Type 1 fonts
- Poor integration with OS font management, meaning the fonts available to Inkscape were not necessarily the same as those available to other apps
If your testing leads you to believe that the above problems are now solved (or at least more bearable) then feel free to toggle the macro. When performance-testing it, make sure you have at least a few hundred ttfs on a non-SSD disk, and it would probably be advisable to wipe the fontconfig cache files before your testing in order to ensure we don't present an atrocious first-time user experience.
The correct solution is to migrate away from pango-fc/pango-win32 and towards pango-cairo.
Richard.
Thanks for the feedback. Unfortunately, I am not in a position to do any serious testing of performance issues because I only have about 100 fonts on my Windows XP machine and Inkscape starts up in about 3 seconds or so. However, here is a list of what I have seen so far. (I know nothing about fonts, so you may have to excuse my terminology.)
- the original Inkscape, with flag USE_PANGO_WIN32 enabled, reports 64 font families which are all of type .otf or .ttf - the modified Inkscape, with flag USE_PANGO_WIN32 disabled, reports 100 font families, of which some are of type .fon - in the switchover, 2 font families were lost, and 38 new families were gained. - the startup time for Inkscape is the same in both cases, 3 seconds - the new list of font families appears to be identical to the list presented by Gimp 2.6 - of the 38 new families, 16 of them fail silently when used in Inkscape, and they revert back to the default Sans (the 16 failures include all the .fon fonts and also some fonts that are not recognized by the font viewer 'dp4 Font Viewer 2.0') - the new fonts that fail in Inkscape, also appear to fail in Gimp as well, as far as I can tell. (in Inkscape I was able to detect the failure explicitly by monitoring the call to InstallFace in FontFactory.cpp) - the remaining 22 new fonts work properly in both Inkscape and Gimp - the list of 22 new fonts that work includes all the fonts that have been previously mentioned by name in Bug 165665 and Bug 887327
- could someone running Windows comment on whether they have any concerns about this change? If not, then I will probably wait a few days and make the change, which consists of about two keystrokes.
Alvin
Hi Alvin, Am I understanding that this would replace the use of vector oriented fonts with bit mapped? If so, then this would be a regression IMHO. Is there something I am missing in this thread?
MarkT ---------------------------------------------------------------- Further on the topic of Fonts.... What is the impact of this in relation to preparing a svg document for web display? It is a blind spot for me. Serving fonts is gaining improvement in web pages. The fontology of svg is gaining as well. Though in web pages, it is likely that until svg 2.0, text will be displayed using foreignObject/html. WOFF == TrueType or OpenType font in a compressed form. Does WebFont == WOFF? http://www.w3.org/TR/2008/REC-CSS2-20080411/fonts.html#q1 In trying to describe my question, I find myself running in a circle I recognize. ;) Looking for clues here: http://www.smashingmagazine.com/2011/03/02/the-font-face-rule-revisited-and-... http://webfonts.info/wiki/index.php?title=@font-face_browser_support Can we prepare an Inkscape svg document to pre-flight fonts for web serving? Similar to the script tag? ------------------------------------------------------------------- On Tue, Nov 15, 2011 at 5:00 AM, Alvin Penner <penner@...1856...> wrote:
Thanks for the feedback. Unfortunately, I am not in a position to do any serious testing of performance issues because I only have about 100 fonts on
no, it would mean that on the Windows platform you would have access to new vector-based .ttf fonts that were previously not available. Some background info is at the bug report:
https://bugs.launchpad.net/inkscape/+bug/165665
committed to rev 10742
2011/11/14 Alvin Penner <penner@...1856...>:
- of the 38 new families, 16 of them fail silently when used in Inkscape,
and they revert back to the default Sans (the 16 failures include all the .fon fonts and also some fonts that are not recognized by the font viewer 'dp4 Font Viewer 2.0')
I am guessing these are bitmap fonts. Currently Inkscape draws all text as paths and cannot use bitmap fonts. This is because the TextLayout class does not use Pango layouts but instead implements its own layout algorithms and outputs the outlines glyph-by-glyph to the rendering engine.
Regards, Krzysztof
On Sun, Nov 13, 2011 at 12:34 PM, Richard Hughes <cyreve@...400...> wrote:
- Poor integration with OS font management, meaning the fonts
available to Inkscape were not necessarily the same as those available to other apps
Alvin,
Years later... after we got the release out, it looks like it is causing a regression.
It appears that fonts enabled via font management software are no longer working in 0.91. Here's a related report: https://bugs.launchpad.net/inkscape/+bug/1416674
I've heard enough noise out in the wild to be able to say it's affecting a noticeable number of people (one person even brought it up to me at scale). Any thoughts on a better solution.
Cheers, Josh
if it is causing a problem, the change can be reversed, it's just a matter of flipping a switch, I don't have any particular strong feelings either way. The change was made in: http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/revision/10742
Alvin
-- View this message in context: http://inkscape.13.x6.nabble.com/non-Unicode-symbol-fonts-do-not-work-on-Win... Sent from the Inkscape - Dev mailing list archive at Nabble.com.
I would be quite willing to make the change, if that is what is desired. Unfortunately, when I did the change here as a trial, I get the following error messages, does anyone know what the source of these errors is?
Alvin
.................................... cc : compile src/libnrtype/FontInstance.cpp (src/libnrtype/FontFactory.h modified) Make error line 307: problem compiling: src/libnrtype/FontInstance.cpp: In function 'Geom::Point pointfx_to_nrpoint(const POINTFX&, double)': src/libnrtype/FontInstance.cpp:332:35: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] src/libnrtype/FontInstance.cpp:333:33: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] src/libnrtype/FontInstance.cpp: In member function 'bool font_instance::FontDecoration(double&, double&, double&, double&)': src/libnrtype/FontInstance.cpp:552:38: error: 'OUTLINETEXTMETRIC' has no member named 'otmUnderscorePosition' src/libnrtype/FontInstance.cpp:553:38: error: 'OUTLINETEXTMETRIC' has no member named 'otmUnderscoreSize' src/libnrtype/FontInstance.cpp:554:38: error: 'OUTLINETEXTMETRIC' has no member named 'otmStrikeoutPosition' src/libnrtype/FontInstance.cpp:555:38: error: 'OUTLINETEXTMETRIC' has no member named 'otmStrikeoutSize'
-- View this message in context: http://inkscape.13.x6.nabble.com/non-Unicode-symbol-fonts-do-not-work-on-Win... Sent from the Inkscape - Dev mailing list archive at Nabble.com.
I made a bit of progress by inspecting the file mingw\include\wingdi.h. According to this, I renamed the variable otm.otmStrikeoutSize to be otm.otmsStrikeoutSize, etc. Did this for all 4 errors and now it compiles with the following warnings below: When I run this new version, I can see that the symbol fonts are missing (for example Commercial PI, Symbol, Technic, Webdings, Wingdings). This is as expected. Also, a lot of the Pango warnings that used to show up when loading the Text and Font Dialog are gone as well, so I assume the change has successfully taken effect. However the warnings concern me, since I have no idea what they mean. Also, I cannot successfully set a default font, it forgets the default font that I previously set. Would someone else be willing to take over at this point, I do not feel technically competent to deal with this issue.
Alvin
..................................
compile src/libnrtype/FontInstance.cpp STDERR: src/libnrtype/FontInstance.cpp: In function 'Geom::Point pointfx_to_nrpoint(const POINTFX&, double)': src/libnrtype/FontInstance.cpp:332:35: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] src/libnrtype/FontInstance.cpp:333:33: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
##### Target : link
-- View this message in context: http://inkscape.13.x6.nabble.com/non-Unicode-symbol-fonts-do-not-work-on-Win... Sent from the Inkscape - Dev mailing list archive at Nabble.com.
Can any of the Windows devs please take a look into this per Alvin's request? This could fix a regression which is affecting a non-trivial number of users and hurts us with the design crowd.
Cheers, Josh
On Thu, Mar 12, 2015 at 6:12 AM, alvinpenner <penner@...1856...> wrote:
I made a bit of progress by inspecting the file mingw\include\wingdi.h.
According to this, I renamed the variable otm.otmStrikeoutSize to be otm.otmsStrikeoutSize, etc. Did this for all 4 errors and now it compiles with the following warnings below: When I run this new version, I can see that the symbol fonts are missing (for example Commercial PI, Symbol, Technic, Webdings, Wingdings). This is as expected. Also, a lot of the Pango warnings that used to show up when loading the Text and Font Dialog are gone as well, so I assume the change has successfully taken effect. However the warnings concern me, since I have no idea what they mean. Also, I cannot successfully set a default font, it forgets the default font that I previously set. Would someone else be willing to take over at this point, I do not feel technically competent to deal with this issue.
Alvin
..................................
compile src/libnrtype/FontInstance.cpp STDERR: src/libnrtype/FontInstance.cpp: In function 'Geom::Point pointfx_to_nrpoint(const POINTFX&, double)': src/libnrtype/FontInstance.cpp:332:35: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] src/libnrtype/FontInstance.cpp:333:33: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
##### Target : link
-- View this message in context: http://inkscape.13.x6.nabble.com/non-Unicode-symbol-fonts-do-not-work-on-Win... Sent from the Inkscape - Dev mailing list archive at Nabble.com.
Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel
running Inkscape rev 14129 on Windows XP, I did some further testing to see if anything had changed recently. Re-enable the USE_PANGO_WIN32 flag and rename the otm.otm*** variables to allow it to compile correctly. Then there are three remaining issues that need to be investigated, listed roughly in order of severity.
1. Warnings of the type below, whose meaning I do not understand:
compile src/libnrtype/FontInstance.cpp STDERR: src/libnrtype/FontInstance.cpp: In function 'Geom::Point pointfx_to_nrpoint(const POINTFX&, double)': src/libnrtype/FontInstance.cpp:332:35: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] src/libnrtype/FontInstance.cpp:333:33: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
2. If starting Inkscape with a previously saved preferences file, in which Times New Roman had previously been set as the default, the behavior is as follows: - start Inkscape, click on Text tool F8 - note that the font family box at the top left says 'sans serif' - click on the page somewhere, note that the font family box switches to 'Times New Roman' as expected - type some text and note that it consists entirely of dots and dashes, no text - this behavior is not entirely reproducible, there are cases where sometimes the text will appear as expected, but in most cases not.
3. If starting Inkscape with no preferences file present, then get a crash with the attached error messages in DOS.
DOSerrors.txt http://inkscape.13.x6.nabble.com/file/n4973635/DOSerrors.txt
-- View this message in context: http://inkscape.13.x6.nabble.com/non-Unicode-symbol-fonts-do-not-work-on-Win... Sent from the Inkscape - Dev mailing list archive at Nabble.com.
in the case of the crash, the backtrace is :
(gdb) symbol-file inkscape.dbg Reading symbols from C:\InkscapeBZR\inkscape/inkscape.dbg...done. (gdb) run Starting program: C:\InkscapeBZR\inkscape/inkscape.exe [New thread 3284.0x708] [New thread 3284.0xd0c] [New thread 3284.0xcf0]
Program received signal SIGSEGV, Segmentation fault. 0x00702add in Inkscape::FontLister::system_fontspec () (gdb) bt #0 0x00702add in Inkscape::FontLister::system_fontspec () #1 0x05adc220 in ?? () #2 0x00000001 in ?? () #3 0x66532bd9 in libglibmm-2!_ZNSs12_S_constructIPcEES0_T_S1_RKSaIcESt20forward _iterator_tag () from C:\InkscapeBZR\inkscape\libglibmm-2.4-1.dll (gdb) c Continuing.
Program received signal SIGSEGV, Segmentation fault. 0x00702add in Inkscape::FontLister::system_fontspec () (gdb) c Continuing.
Program exited with code 030000000005. .................................................................
- Alvin
-- View this message in context: http://inkscape.13.x6.nabble.com/non-Unicode-symbol-fonts-do-not-work-on-Win... Sent from the Inkscape - Dev mailing list archive at Nabble.com.
2015-05-09 14:38 GMT+02:00 alvinpenner <penner@...1856...>:
in the case of the crash, the backtrace is :
(gdb) symbol-file inkscape.dbg Reading symbols from C:\InkscapeBZR\inkscape/inkscape.dbg...done. (gdb) run Starting program: C:\InkscapeBZR\inkscape/inkscape.exe [New thread 3284.0x708] [New thread 3284.0xd0c] [New thread 3284.0xcf0]
Program received signal SIGSEGV, Segmentation fault. 0x00702add in Inkscape::FontLister::system_fontspec () (gdb) bt #0 0x00702add in Inkscape::FontLister::system_fontspec () #1 0x05adc220 in ?? () #2 0x00000001 in ?? () #3 0x66532bd9 in libglibmm-2!_ZNSs12_S_constructIPcEES0_T_S1_RKSaIcESt20forward _iterator_tag () from C:\InkscapeBZR\inkscape\libglibmm-2.4-1.dll (gdb) c Continuing.
There was a possible null pointer dereference in system_fontspec, which I fixed now, but I'm not sure it was the real culprit for this crash.
Regards, Krzysztof.
Whats PathInfo class? *Is a new class for give information about a curve -or D2<SBasis>- in a PathVector.
Whath kind of info I can get? * Whats the subpath index of a curve * Whats the first or last curve in current subpath * Whats the next/previous curve index in current subpath -this maybe changed to hasNext() and hasPrev() to remove boost::optional * Is this subpath closed? * Lenght of a subpath * Number of subpaths ...
Why? *Think using this we can reduce a lot the number, complexity and size of pathvector loops.
How? *I translate a PathVector to a std::vector<size_t index, bool closed> stroring only the last curve index of each subpath and if is closed.
Why no integrate to PathVector itself? *Why not?
thanks, Krzysztof, that appears to have fixed the crash.
With this change, rev 14135, it is almost possible to enter text data, but not very reliably. I was able to enter text and use the Text and Font dialog to save Times New Roman as the new default. Then on the next startup I get the following behavior. - start Inkscape with the Text and Font dialog loaded from before, and docked. - click on the Text tool F8, note that the dialog box says 'sans-serif' on the top toolbar - click on the page somewhere and note that the dialog box now says 'Times New Roman' as expected - type some text and note that the text does not show up on the page anywhere, but does show up correctly in the Text and Font dialog box preview area in the docked dialog.
Alvin
-- View this message in context: http://inkscape.13.x6.nabble.com/non-Unicode-symbol-fonts-do-not-work-on-Win... Sent from the Inkscape - Dev mailing list archive at Nabble.com.
participants (7)
-
Alvin Penner
-
alvinpenner
-
Jabiertxo Arraiza Cenoz
-
Josh Andler
-
Krzysztof Kosiński
-
Mark T
-
Richard Hughes